Add rollback after failed migration to allow subsequent migrations to run

When a migration fails, the transaction is left in a failed state. Without
rollback, all subsequent migrations fail with "current transaction is aborted".
This was preventing the team_id column from being added to projects.
This commit is contained in:
Mondo Diaz
2026-01-28 20:27:46 +00:00
parent aed48bb4a2
commit c60a7ba1ab

View File

@@ -347,6 +347,7 @@ def _run_migrations():
conn.execute(text(migration))
conn.commit()
except Exception as e:
conn.rollback()
logger.warning(f"Migration failed (may already be applied): {e}")