aboutsummaryrefslogtreecommitdiff
path: root/migrations/env.py
diff options
context:
space:
mode:
Diffstat (limited to 'migrations/env.py')
-rw-r--r--migrations/env.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/migrations/env.py b/migrations/env.py
index 88c71290..e06cd8db 100644
--- a/migrations/env.py
+++ b/migrations/env.py
@@ -1,5 +1,11 @@
from __future__ import with_statement
+
from alembic import context
+# add your model's MetaData object here
+# for 'autogenerate' support
+# from myapp import mymodel
+# target_metadata = mymodel.Base.metadata
+from flask import current_app
from sqlalchemy import engine_from_config, pool
# this is the Alembic Config object, which provides
@@ -10,11 +16,6 @@ config = context.config
# This line sets up loggers basically.
# fileConfig("./alembic.ini")
-# add your model's MetaData object here
-# for 'autogenerate' support
-# from myapp import mymodel
-# target_metadata = mymodel.Base.metadata
-from flask import current_app
config.set_main_option(
"sqlalchemy.url", current_app.config.get("SQLALCHEMY_DATABASE_URI")
bgstack15