Plan compatibility across the rollout
For a change that cannot be applied atomically, use an expand-and-contract sequence: add compatible structures first, deploy code that can work with both forms, backfill data, then remove the old structure only after it is no longer used.
Estimate locks, table rewrites, index creation, and backfill cost on representative data. A migration that is fast on a small development database may block writes or exceed a deployment window at production scale.
Protect data and verify each stage
Take a recoverable backup or confirm point-in-time recovery according to your database's capabilities. Test the migration and the restore procedure; a backup that has never been restored is not a demonstrated recovery plan.
Deploy with observable checkpoints: migration start, completion, row counts, and application health. If a step fails, stop dependent rollout actions and decide whether to retry, roll forward, or restore based on the actual migration state.