diff --git a/server/alembic/env.py b/server/alembic/env.py index 23e8ad4..404bd1b 100644 --- a/server/alembic/env.py +++ b/server/alembic/env.py @@ -52,6 +52,13 @@ def run_migrations_online() -> None: connection=connection, target_metadata=target_metadata, 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(): context.run_migrations()