The build had been green for weeks. Then someone asked for a new column.
A new column sounds simple, but every data change carries risk. Adding columns to a database table can trigger schema migrations, break downstream queries, slow performance, or cause application errors. The goal is simple: make the new column available without downtime, without corrupting data, and without losing control of the deployment process.
First, decide if the new column is nullable or has a default value. Nullable columns are safer for zero-downtime migrations because existing rows do not need immediate updates. If the column requires a default and is large, update in batches instead of locking the table.
Second, apply the schema change in a controlled migration. Use versioned migration scripts. Review how ORM tools or migration frameworks generate ALTER TABLE commands — many will lock the entire table if not configured. For high-traffic systems, test migrations against a replica to understand lock times and index impact.