Fix alembic migrations importing app

Ensure we connect to loaded config db
This commit is contained in:
Sam Chow 2018-06-19 13:46:34 -04:00
parent bb2b28cd11
commit b5f630ba29
18 changed files with 69 additions and 81 deletions

View file

@ -118,7 +118,7 @@ class SuperUserSetupDatabase(ApiResource):
log_handler = _AlembicLogHandler()
try:
run_alembic_migration(log_handler)
run_alembic_migration(app.config['DB_URI'], log_handler)
except Exception as ex:
return {
'error': str(ex)