The schema just broke. You have to add a new column, and downtime is not an option.
A new column sounds simple, but in production systems it can be dangerous. Unplanned writes, long-running migrations, and lock contention can cripple performance. When working with relational databases like PostgreSQL, MySQL, or SQL Server, the wrong migration can block queries, stall critical services, and trigger cascading failures.
The key is to control scope and apply changes without interrupting live traffic. Always start by defining the new column with the most lightweight change possible—no indexes, foreign keys, or constraints in the first step. For example:
ALTER TABLE orders ADD COLUMN fulfilled_at TIMESTAMP NULL;
Run migrations as reversible steps. Add defaults and indexes afterward in separate operations. This prevents the database from rewriting massive amounts of data at once. If the column must be populated for existing rows, batch updates to avoid full table locks.