From 9d1ed50a2d17baa33b8b8b320f5bd05d33b917ba Mon Sep 17 00:00:00 2001 From: Alexander Kislitsky Date: Tue, 16 Aug 2016 15:52:02 +0300 Subject: [PATCH] Fix for migration scripts DB upgrade/downgrade scripts don't require keystone authorization. Change-Id: I5be1b220ac9f038057e131caeeed8888fee9ca90 --- tuning_box/migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuning_box/migration.py b/tuning_box/migration.py index 8496556..96d2fa1 100644 --- a/tuning_box/migration.py +++ b/tuning_box/migration.py @@ -28,12 +28,12 @@ def get_alembic_config(engine): def upgrade(): - with app.build_app().app_context(): + with app.build_app(with_keystone=False).app_context(): config = get_alembic_config(db.db.engine) alembic_command.upgrade(config, 'head') def downgrade(): - with app.build_app().app_context(): + with app.build_app(with_keystone=False).app_context(): config = get_alembic_config(db.db.engine) alembic_command.downgrade(config, 'base')