The table was live in production, and you had to add a new column. No sandbox. No do-overs. Just code, latency budgets, and the weight of real users hitting the app.
Adding a new column seems simple until the schema is under heavy load. One wrong migration and you lock writes, spike CPU, or corrupt data. In relational databases, creating a new column can trigger a full-table rewrite if not planned. On large datasets, that means downtime or degraded performance.
For PostgreSQL, adding a nullable column without a default is fast—no table rewrite, just a catalog update. But adding a column with a default value will rewrite every row, which blocks long enough to hurt. Avoid defaults in the migration, then backfill in batches. MySQL with InnoDB behaves differently; recent versions can add columns instantly in some cases, but types and constraints still matter.