Adding a new column seems simple, but in production systems it can trigger downtime, locks, and degraded performance. Schema changes at scale are dangerous without the right approach. The longer a migration runs, the more you risk blocking writes, delaying queries, and impacting users.
The first step is deciding how to add the new column without locking the table. For PostgreSQL, ADD COLUMN without default values is often instant. MySQL requires more care—online DDL or tools like pt-online-schema-change help avoid full table locks. In distributed SQL systems, adding a new column should be staged to ensure replicas stay in sync.
Plan for backfills separately. Apply the schema change first to make the column available. Then run an asynchronous job to write initial values in small batches, keeping write throughput safe. Avoid long transactions. Monitor query plans after the change to ensure indexes still work as expected.