Use expand-and-contract migrations to keep old and new application versions working during a rollout.
- database migration
- zero downtime deployment
- schema changes
- release engineering
Expand before you switch
Add the new column or table in a backward-compatible way while the existing application still works. Deploy code that can read both forms or write to both during the transition.
Software Engineering
Thoughtful decisions compound over time.
Practical product work brings technical choices back to the people and workflows they are meant to serve.
Backfill and verify
Move existing data in bounded batches, track failures, and compare row counts or checksums. Keep the migration observable so a partially completed backfill is not mistaken for success.
Contract only after confidence
Remove the old field in a later release after all application instances and consumers have switched. For high-impact changes, have an experienced team review lock behavior and rollback options.
Practical application
For a renamed field, add the new column, dual-write during rollout, backfill old rows in batches, and compare values. Switch reads only after validation, then remove the old column in a later deployment with a rehearsed rollback plan.