Adding a new column sounds simple, but the wrong approach can trigger locks, performance stalls, or deployment rollbacks. In modern schemas, a new column is more than a structural change — it’s a migration event that touches code, data, and operations at once.
The first step is to decide the column’s type, default value, and nullability. Database engines handle these factors differently. For example, adding a nullable column without a default is usually instant in PostgreSQL and MySQL, but adding one with a default can rewrite the entire table. On large datasets, that’s dangerous.
In production deployments, use an additive migration. Create the new column as nullable, ship the schema change, and push application updates that can write to both old and new fields. Backfill the column in batches to avoid I/O spikes. Then, when data is in place, enforce NOT NULL and defaults as a separate fast DDL change.