The migration finished at 2:14 a.m. The new column was there, sitting in the schema, waiting to take its first write. Adding a new column seems simple. It isn’t. One bad move in production can lock tables, spike load, and halt deploys.
When you create a new column in a live database, the choice of operation matters. ALTER TABLE on large datasets can block reads and writes. Some engines allow online DDL, but every engine’s implementation is different. Postgres can add nullable columns with a default quickly, but adding defaults on existing rows will rewrite the table. MySQL’s instant add is faster, but not for every type. SQLite’s ALTER TABLE ADD COLUMN works, but you can’t remove it later without rebuilding.
Plan column additions like code changes. Check the engine’s DDL behavior, lock patterns, and replication impact. For high-traffic systems, use backfill in batches. Add the column without a default, deploy code that writes it for new rows, then backfill existing data asynchronously. Monitor performance during every step.