A single missing new column broke the build.
Adding a new column to a database table sounds simple. In production systems, it is anything but. Schema changes disrupt queries, ORMs, caching layers, and downstream integrations. A careless migration can lock tables, stall writes, and trigger timeouts.
To add a new column safely, start with a backwards-compatible plan. Deploy the schema update in stages. First, write the migration with NULL support or a default value to avoid breaking existing inserts. If the column is non-nullable, backfill it in small batches. Monitor locks and query performance as the migration runs.
When using ORMs or query builders, update model definitions in sync with the migration. Keep the code able to handle both the old and new schema until the change is live everywhere. This prevents runtime errors during deploys that span multiple instances.