Adding a new column to a production database looks simple. It is not. Schema changes trigger locks, rewrite data, and ripple through every dependent system. In modern services where deployments run multiple times a day, a poorly executed column add can stall writes, spike latency, or even bring the app down.
First, choose the right migration strategy. Online schema change tools allow you to add a new column without blocking operations. In PostgreSQL, ADD COLUMN with a default non-null value rewrites the whole table, so run it in stages: add the nullable column, backfill in batches, then set constraints. MySQL and MariaDB have similar concerns, though recent versions improve in-place DDL.
Second, update application code in a safe sequence. Deploy support for the new column before the data is fully populated. Avoid writing to it until it is live in every shard or replica. Use feature flags to gate usage. Monitor replication lag and query plans to ensure indexes are not misfiring from the schema change.