Fix for migration scripts

DB upgrade/downgrade scripts don't require keystone authorization.

Change-Id: I5be1b220ac9f038057e131caeeed8888fee9ca90
This commit is contained in:
Alexander Kislitsky 2016-08-16 15:52:02 +03:00
parent 03b9cd3a03
commit 9d1ed50a2d
1 changed files with 2 additions and 2 deletions

View File

@ -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')