Adding a new column sounds trivial, but in production it’s where schemas and SLAs collide. The operation must be fast, safe, and compatible with existing reads and writes. For relational databases like Postgres or MySQL, ALTER TABLE can lock writes. On high‑traffic tables, that can stall the app. On massive datasets, it can run for hours.
The strategy is to shape the change for safety. First, add the new column as NULL or with a default that does not backfill old rows immediately. That keeps the DDL operation nearly instant. Next, deploy code that writes to both the old and new schema paths if needed. Then backfill the column in small batches to avoid load spikes. Finally, switch reads to use the new column and remove legacy references.
In distributed systems, schema migrations must be forward- and backward-compatible. Both old and new code should run safely during the deploy window. Use feature flags to control rollout of the new column, and monitor query performance while the backfill executes.