The database table was ready, but the data model needed one more thing: a new column.
Adding a new column should be simple, but in production systems it can trigger migrations, block writes, and create downtime. The right approach depends on your database engine, schema migration tools, and deployment pipeline. At scale, a careless schema change can stall requests or cause partial data loss.
Before adding a new column, define its purpose and default values. Decide if it can be nullable, if it needs an index, or if it requires constraints. For relational databases like PostgreSQL or MySQL, adding a nullable column without a default is usually instant. Adding a non-null column with a default often rewrites the entire table. For large tables, that means heavy locks and degraded performance.
Zero-downtime migrations use staged rollouts. First, create a nullable column. Deploy application code that can read from and write to both old and new fields. Backfill in small batches. Then apply constraints and defaults after data is in place. This avoids blocking queries and allows rollback if needed.