the db might not have permissions for this. Schema needs to exist ahead of time which is fine

This commit is contained in:
2025-11-18 19:36:08 +00:00
parent 8e2de0fa94
commit 57dac8514c

View File

@@ -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}"))