Adding a new column is one of the simplest and most dangerous operations in software. Done right, it unlocks new product features, better analytics, and cleaner code. Done wrong, it slows deployments, breaks queries, and corrupts data. The execution matters.
When a schema migration adds a new column, the first question is: should it be nullable, have a default, or require backfilled data? Default values can lock your table during write-heavy loads. Backfills can push CPU and I/O beyond safe limits. Nullability can protect uptime but leave you cleaning up broken assumptions in application logic later.
On large datasets, avoid blocking operations. Use an online schema migration tool. Add the new column without a default, then backfill in batches. Keep each batch small enough to avoid saturating replicas or slowing primary write throughput. After backfill completes, enforce constraints if needed.