The migration was supposed to be routine. Then a single missing new column stopped the deploy and locked production for twenty minutes.
Adding a new column to a database table is one of the most common schema changes. It is also one of the most dangerous when done without planning. Even a small column addition can trigger full table rewrites, lock rows during ALTER TABLE, or cause downtime in high-traffic systems. The wrong choice in data type or default value can choke I/O, break indexes, or inflate storage.
A new column should be created with zero-downtime in mind. For relational databases, this often means avoiding expensive defaults that rewrite the entire table. Use NULLable columns first, then backfill data in batches. For large datasets, prefer schema change tools such as pt-online-schema-change or gh-ost to avoid blocking writes. In PostgreSQL, adding a column with a default that is not volatile can be instant; default expressions that touch every row are not.