The schema was wrong. The data was growing sideways. You needed a new column, and you needed it fast.
Adding a new column should be the simplest schema change in the book. Yet in production, it can bring downtime, locked tables, and failed migrations. Speed and safety depend on choosing the right approach for your database engine, your workload, and your deployment windows.
In PostgreSQL, a new column with a default can block large tables. Use ALTER TABLE … ADD COLUMN without the default, then backfill in batches. In MySQL, ALTER TABLE often copies the entire table unless you use ALGORITHM=INSTANT or ALGORITHM=INPLACE where supported. For massive datasets, online schema change tools like gh-ost or pt-online-schema-change can make the operation non-blocking.