aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Bobrov <breton@cynicmansion.ru>2017-03-04 10:58:48 +0300
committerBoris Bobrov <breton@cynicmansion.ru>2017-03-04 10:58:48 +0300
commit3bad5310f683f2512e5d184555aa0108fbd3ff4b (patch)
treed9699f3a90af885937c35890b58fdc36ddba0667
parent2d0870e0617ef55951419a3e08de13f66b46c24d (diff)
downloadmediagoblin-3bad5310f683f2512e5d184555aa0108fbd3ff4b.tar.lz
mediagoblin-3bad5310f683f2512e5d184555aa0108fbd3ff4b.tar.xz
mediagoblin-3bad5310f683f2512e5d184555aa0108fbd3ff4b.zip
Pass connection to EnvironmentContext.configure
In https://bitbucket.org/zzzeek/alembic/issues/419/ we were suggested use connection instead of engine. This should fix an issue reported via ml.
-rw-r--r--mediagoblin/db/migrations/env.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/mediagoblin/db/migrations/env.py b/mediagoblin/db/migrations/env.py
index 43b7b247..a6d05cd1 100644
--- a/mediagoblin/db/migrations/env.py
+++ b/mediagoblin/db/migrations/env.py
@@ -48,7 +48,7 @@ def run_migrations_online():
and associate a connection with the context.
"""
- connection = config.attributes["session"].get_bind()
+ connection = config.attributes["session"].connection()
context.configure(
connection=connection,
target_metadata=target_metadata
@@ -61,4 +61,3 @@ if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()
-