Merge branch 'fix/alembic-transaction-per-migration': truthful migration logs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,13 @@ def run_migrations_online() -> None:
|
|||||||
connection=connection,
|
connection=connection,
|
||||||
target_metadata=target_metadata,
|
target_metadata=target_metadata,
|
||||||
compare_type=True,
|
compare_type=True,
|
||||||
|
# Each migration commits on its own. One transaction for the WHOLE
|
||||||
|
# run meant a crash at step N rolled back steps 1..N-1 while their
|
||||||
|
# "Running upgrade" lines stayed on screen claiming they ran - the
|
||||||
|
# 2026-08-21 outage's stamp-to-head repair trusted those lines and
|
||||||
|
# left production missing two tables (found 2026-08-23 when the
|
||||||
|
# locations import 500'd on a table that "had been created").
|
||||||
|
transaction_per_migration=True,
|
||||||
)
|
)
|
||||||
with context.begin_transaction():
|
with context.begin_transaction():
|
||||||
context.run_migrations()
|
context.run_migrations()
|
||||||
|
|||||||
Reference in New Issue
Block a user