Update alembic/env to work with flask app
This commit is contained in:
parent
f8cee60baa
commit
46a608794d
@ -30,11 +30,10 @@ sys.path.append(parent_dir)
|
|||||||
|
|
||||||
from atst.app import make_config
|
from atst.app import make_config
|
||||||
app_config = make_config()
|
app_config = make_config()
|
||||||
config.set_main_option('sqlalchemy.url', app_config['default']['DATABASE_URI'])
|
config.set_main_option('sqlalchemy.url', app_config['DATABASE_URI'])
|
||||||
|
|
||||||
from atst.database import make_db
|
from atst.database import db
|
||||||
from atst.models import *
|
from atst.models import *
|
||||||
db = make_db(app_config)
|
|
||||||
target_metadata = Base.metadata
|
target_metadata = Base.metadata
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user