-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore permisison errors creating Snowflake schema
Update the Snowflake registry creation scripts to ignore permission errors when creating or commenting on the registry schema, to account for the case where the schema already exists but the current user does not have permission to execute `CREATE SCHEMA`. Suggested by Peter Wimsey (resolves #826).
- Loading branch information
Showing
4 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
ALTER TABLE ®istry.changes DROP UNIQUE(script_hash); | ||
ALTER TABLE ®istry.changes ADD UNIQUE(project, script_hash); | ||
COMMENT ON SCHEMA ®istry IS 'Sqitch database deployment metadata v1.0.'; | ||
EXECUTE IMMEDIATE $$ | ||
BEGIN | ||
COMMENT ON SCHEMA ®istry IS 'Sqitch database deployment metadata v1.1.'; | ||
EXCEPTION WHEN statement_error THEN | ||
IF (sqlstate = '42501') THEN RETURN ''; END IF; | ||
END; | ||
$$; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters