The schema was brittle. One more change and the whole thing could snap. You needed a new column, and you needed it without breaking production.
Adding a new column in a live system is not just a migration. It is a decision point. The wrong move locks you into downtime, data loss, or messy rollbacks. The right move makes the change seamless, backward compatible, and safe for rapid deployment.
First, define the new column with null defaults. This keeps existing writes valid. Do not force data population during creation unless absolutely required. Let the schema change be as small as possible.
Second, deploy the migration separately from the code using it. The database should be ahead of your application. This avoids coordinating app and schema changes in one risky deployment.
Third, populate the column in batches. Large tables demand careful backfills to prevent blocking queries or saturating I/O. Use background jobs with rate limits. Track progress.