The migration failed halfway. A single missing new column stopped the deploy cold.
Adding a new column sounds simple. In production databases, it is not. Schema changes impact performance, lock tables, and break queries you forgot existed. The cost of one wrong migration can cascade across services.
The right approach starts with the migration strategy. Decide if the new column should be nullable, have a default value, or be backfilled from existing data. Avoid forcing a full table rewrite in a single transaction. Use staged rollouts to keep systems online.
First, create the new column as nullable with no default to reduce lock contention. Deploy application code that writes to both the old and new columns. Backfill data in small batches. Monitor query performance and replication lag. When complete, make the column non-nullable or adjust constraints as needed.