In https://bitbucket.org/zzzeek/alembic/issues/419/ we were suggested
use connection instead of engine. This should fix an issue reported
via ml.
(cherry picked from commit
3bad5310f683f2512e5d184555aa0108fbd3ff4b)
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
run_migrations_offline()
else:
run_migrations_online()
-