The table was missing something. You needed a new column, and it had to be there before the next deploy. No frills, no downtime, no breaking production. Just a clean schema change, live in minutes.
A new column sounds simple. In practice, it can break everything if you don’t get it right. Schema migrations touch critical paths. They change how data is stored, queried, indexed. Adding a column without planning can lock tables, block writes, or cause inconsistent reads in production.
The safest path starts with defining the column type and constraints. Avoid defaults that force a full-table rewrite unless necessary. Use NULL for transitional changes, then backfill and update constraints in small batches. Consider the needs of existing queries—will they ignore the column, join on it, or filter by it? Run benchmarks on staging to catch query plan changes before release.