# Irreversible migration fails midway: pre-release checklist

Source: https://releasefailures.com/incidents/irreversible-migration-fails-midway/
Content version: 1.0.0
Verified on: 2026-10-21
Licence: CC BY 4.0

Definition: A schema migration stops halfway and cannot be rolled back, leaving tables in a mixed state.
- [ ] PR-01 Run each migration against a production-sized database copy and list every step that executes outside a transaction. (test class: Migration tests)
- [ ] PR-02 Run the down migration for every step on the copy and mark any step without a working down path as irreversible in the pull request. (test class: Migration tests)
- [ ] PR-03 Split a migration that adds a unique column into separate releases for adding the column, backfilling it and adding the constraint. (test class: Migration tests)
- [ ] PR-04 Count rows in the source tables and the new tables after the data move step and confirm the counts match before the release proceeds. (test class: Migration tests)
- [ ] PR-05 Write to the table under test at production rate while the backfill step runs on the copy, then confirm the unique constraint applies. (test class: Load and performance tests)
- [ ] PR-06 Kill the migration process midway on the copy and confirm the schema either returns to its previous version or resumes from the failed step. (test class: Chaos and resilience tests)
- [ ] PR-07 Confirm the deploy tool can roll back a partially applied migration in the staging environment. (test class: Chaos and resilience tests)
