The schema was perfect until it wasn’t. A single change request landed on your desk: add a new column. Simple on paper. Dangerous in production. One wrong move and queries explode, services stall, and users see errors they never should.
Adding a new column in a live database is not a trivial update. It touches migrations, indexing, replication, caching, and every part of your read and write paths. In PostgreSQL, an ALTER TABLE ADD COLUMN with a default value can lock the table. In MySQL, depending on the storage engine, it may copy the whole table before returning control. Even in cloud-managed databases, altering a schema is still bound by storage requirements and concurrency limits.
A safe workflow for adding a new column begins with a plan. Create the column without a default. Populate it in small, batched updates to avoid write spikes. Backfill with an idempotent script you can resume if interrupted. Add indexes after the data is in place to minimize impact on production workloads. Update application code to handle both old and new schemas during the migration window.