The schema migration was seconds from going live when the need for a new column hit. The query would break without it. The data model would drift. The release would fail.
A new column sounds simple. It rarely is. In production, every change has weight. Adding it impacts indexes, queries, data consistency, and application logic. The wrong approach makes deployments slow, brittle, and risky.
The first step is clear: define exactly why the new column exists. Is it for storing derived data, tracking state, or enabling a new feature? Lock in the name, type, and constraints before you touch the database. Avoid assumptions.
Plan the rollout. For large datasets, adding a new column can lock tables and block writes. Use an online schema change tool or a phased migration. Write migrations idempotently. Avoid setting non-null constraints upfront if backfilling is required—apply them only when the data is in place.