Adding a new column sounds trivial, but in production, the wrong approach can trigger downtime, lock tables, or force costly full-table rewrites. The key is to control schema changes with precision.
In relational databases like PostgreSQL or MySQL, a ALTER TABLE ADD COLUMN statement can be safe—if the new column is nullable and has no default. This avoids rewriting every row. Setting a default or a NOT NULL constraint in the same statement risks rewriting the table in place. The fix is to add the column first, then backfill data in controlled batches, and finally add constraints.
In distributed SQL, the same principle applies but the mechanics change. Schema propagation can cause version skew across nodes. Coordinating new column deployments with a feature flag ensures old and new application code can run side-by-side until migration completes.