prevent alembic from configuring logger (#2826)

* k

* k
This commit is contained in:
pablodanswer
2024-10-17 09:31:17 -07:00
committed by GitHub
parent 44ebe3ae31
commit a159779d39
2 changed files with 3 additions and 1 deletions

View File

@@ -31,6 +31,9 @@ def run_alembic_migrations(schema_name: str) -> None:
"script_location", os.path.join(root_dir, "alembic")
)
# Ensure that logging isn't broken
alembic_cfg.attributes["configure_logger"] = False
# Mimic command-line options by adding 'cmd_opts' to the config
alembic_cfg.cmd_opts = SimpleNamespace() # type: ignore
alembic_cfg.cmd_opts.x = [f"schema={schema_name}"] # type: ignore