A deployment may run more than one application version at once. Renaming or deleting a database field in the same release can break an older process that still expects it.
Expand, migrate, then contract
- Add the new field or table without removing the old structure.
- Deploy code that can read the existing data and write the new representation.
- Backfill in bounded batches, verify the results, then switch reads to the new field.
Remove the old contract later
After all application versions and background workers have moved, stop writing the old field and observe the system. Remove it in a separate migration with a tested recovery plan.
Large backfills need progress, rate limits, and a way to resume. Test migration behavior on realistic data volume; a migration that works on a tiny development database may lock a busy production table.
