projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d0870e
)
Pass connection to EnvironmentContext.configure
author
Boris Bobrov
<breton@cynicmansion.ru>
Sat, 4 Mar 2017 07:58:48 +0000
(10:58 +0300)
committer
Boris Bobrov
<breton@cynicmansion.ru>
Sat, 4 Mar 2017 07:58:48 +0000
(10:58 +0300)
In https://bitbucket.org/zzzeek/alembic/issues/419/ we were suggested
use connection instead of engine. This should fix an issue reported
via ml.
mediagoblin/db/migrations/env.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/db/migrations/env.py
b/mediagoblin/db/migrations/env.py
index 43b7b24765aebda18ce1721f4fb25d2b62f8f938..a6d05cd1fd13683c77f2ba91c471d76175115c87 100644
(file)
--- 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()
-