From 6d96949f312897bcc15764eb4109c2694d5ca486 2016-11-07 16:05:28 From: Marcin Lulek Date: 2016-11-07 16:05:28 Subject: [PATCH] migrations: enable sqlalchemy echo on migrations --- diff --git a/backend/src/appenlight/scripts/migratedb.py b/backend/src/appenlight/scripts/migratedb.py index 6a487db..2e6ff4e 100644 --- a/backend/src/appenlight/scripts/migratedb.py +++ b/backend/src/appenlight/scripts/migratedb.py @@ -47,12 +47,14 @@ def main(argv=sys.argv): bootstrap(config_uri) registry = get_current_registry() alembic_cfg = Config() + alembic_cfg.set_main_option("sqlalchemy.echo", 'true') alembic_cfg.set_main_option("script_location", "ziggurat_foundations:migrations") alembic_cfg.set_main_option("sqlalchemy.url", registry.settings["sqlalchemy.url"]) command.upgrade(alembic_cfg, "head") alembic_cfg = Config() + alembic_cfg.set_main_option("sqlalchemy.echo", 'true') alembic_cfg.set_main_option("script_location", "appenlight:migrations") alembic_cfg.set_main_option("sqlalchemy.url", registry.settings["sqlalchemy.url"]) @@ -65,6 +67,7 @@ def main(argv=sys.argv): config['sqlalchemy_migrations']) alembic_cfg.set_main_option("sqlalchemy.url", registry.settings["sqlalchemy.url"]) + alembic_cfg.set_main_option("sqlalchemy.echo", 'true') command.upgrade(alembic_cfg, "head") with get_current_request().tm: