The migration failed. The logs pointed to a single column that didn’t exist yesterday, but had to exist today. That’s the cost of ignoring how new columns behave in production.
Adding a new column is one of the most common schema changes. It sounds simple, but small choices at this stage decide whether you ship in minutes or roll back in panic. The database engine must rewrite metadata, sometimes rewrite every row. The risk climbs with table size, locks, and default values.
In relational databases, adding a nullable column without a default is usually fast. The metadata updates in place. Adding a non-nullable column with a default? That can cause a full table rewrite. On high-traffic systems, that rewrite blocks queries, inflates I/O, and spikes replication lag.
For PostgreSQL, ALTER TABLE ADD COLUMN is metadata-only if the new column is nullable or has a constant default that can be stored in system catalogs. For MySQL, behavior varies by storage engine and version. InnoDB before 5.6 might rebuild the entire table. Newer versions use “instant” DDL for certain cases, but you need to confirm support before running it live.