A schema change hits the database, and the clock starts ticking. You need a new column. Not tomorrow, not after the next sprint—now.
Adding a new column sounds simple, but at scale it can break queries, cause lock contention, and trigger costly downtime. The right approach minimizes risk and keeps production responsive.
First, determine the exact name, type, and default value for the new column. Avoid generic names. Use the smallest possible data type to reduce storage and improve index performance.
Second, choose the safest migration path. For large tables, an ALTER TABLE with a non-null column can lock writes. Instead, create the column as nullable, backfill data in small batches, then add constraints or defaults later. This phased migration prevents spikes in load.