Fix for migration scripts
DB upgrade/downgrade scripts don't require keystone authorization. Change-Id: I5be1b220ac9f038057e131caeeed8888fee9ca90
This commit is contained in:
parent
03b9cd3a03
commit
9d1ed50a2d
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user