Smoke from an overworked CI pipeline curled across the screen while the database migration waited on a single line: ADD COLUMN.
A new column is never just a new column. It changes the schema, shifts indexes, and touches every query path that depends on that table. Done carelessly, it triggers downtime, locks, or silent data drift. Done right, it’s invisible to the user and safe under real load.
Before adding a new column, check row counts, I/O stats, and replication lag. On large tables, avoid blocking DDL. Use online schema change tools or database-native features like ALTER TABLE ... ADD COLUMN ... DEFAULT NULL with ALGORITHM=INPLACE or equivalent. Test on staging with production-like data volumes. Measure query plans before and after.
Consider default values carefully. Setting a non-null default causes the database to rewrite the entire table, which can kill throughput. Initialize new column data in batches after creation instead. Backfill during low-traffic windows and monitor for replication lag spikes.