the db might not have permissions for this. Schema needs to exist ahead of time which is fine
This commit is contained in:
@@ -82,7 +82,7 @@ def do_run_migrations(connection: Connection) -> None:
|
|||||||
with context.begin_transaction():
|
with context.begin_transaction():
|
||||||
# Create schema if it doesn't exist
|
# Create schema if it doesn't exist
|
||||||
if SCHEMA:
|
if SCHEMA:
|
||||||
connection.execute(text(f"CREATE SCHEMA IF NOT EXISTS {SCHEMA}"))
|
#connection.execute(text(f"CREATE SCHEMA IF NOT EXISTS {SCHEMA}"))
|
||||||
# Set search path to our schema
|
# Set search path to our schema
|
||||||
print(f"setting search path to schema {SCHEMA}, ")
|
print(f"setting search path to schema {SCHEMA}, ")
|
||||||
connection.execute(text(f"SET search_path TO {SCHEMA}"))
|
connection.execute(text(f"SET search_path TO {SCHEMA}"))
|
||||||
|
|||||||
Reference in New Issue
Block a user