Merge "db: Don't rely on branched connections"

This commit is contained in:
Zuul 2024-04-15 17:09:44 +00:00 committed by Gerrit Code Review
commit 3ca2d4fdc8

View File

@ -68,7 +68,12 @@ def run_migrations_online():
target_metadata=target_metadata)
with context.begin_transaction():
context.run_migrations()
else:
context.configure(
connection=connectable,
target_metadata=target_metadata)
with context.begin_transaction():
context.run_migrations()
if context.is_offline_mode():
run_migrations_offline()