The data model just broke. You need a new column, and you need it without bringing the entire system down.
Adding a new column sounds simple. It is not. In production, every schema change is a moving target. Tables can be massive. Queries depend on legacy structures. Services run nonstop. The wrong approach locks rows, spikes CPU, and triggers timeouts across critical paths.
The safest path to a new column starts with zero-downtime migration techniques. Create the column first with a default of NULL. Avoid expensive schema rewrites on active traffic. Backfill data in batches to reduce load. Use feature flags or compatibility code so both old and new flows run in parallel. Only switch defaults or constraints once the field is fully populated and validated.
In relational databases like PostgreSQL or MySQL, adding a column to a large table can still block writes if not planned carefully. For PostgreSQL, use ALTER TABLE ... ADD COLUMN for fast metadata-only changes when adding nullable columns without defaults. For MySQL, consider online DDL or tools like gh-ost and pt-online-schema-change to run migrations without downtime.