-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to run sqitch without CREATE SCHEMA privilege in Snowflake? #826
Comments
After patching up snowflake.sql as described before and also taking out |
I'm confused as to why this is running at all. Sqitch only tries to create the scheme if it doesn't already exist. Here's the relevant code: sqitch/lib/App/Sqitch/Role/DBIEngine.pm Lines 103 to 115 in 5522821
It depends on the _no_table_error function: return $DBI::state && $DBI::state eq '42S02'; # ERRCODE_UNDEFINED_TABLE And I wonder why Sqitch thinks the schema doesn't exist in your case. Here's where it creates the schema only if it doesn't exist already: sqitch/lib/App/Sqitch/Engine.pm Lines 241 to 251 in 5522821
|
Dear Sqitch,
We'd prefer to not give sqitch CREATE SCHEMA privileges. Instead we'd like to create the registry schema through another process and then have sqitch only create the tables in there.
Looking at the SQL for Snowflake it requires CREATE SCHEMA privileges even if the schema exists:
https://github.com/sqitchers/sqitch/blob/v1.4.1/lib/App/Sqitch/Engine/snowflake.sql
Would it be possible to do something like this instead?
Thanks
The text was updated successfully, but these errors were encountered: