The table was broken. Data sprawled across columns that no longer reflected reality. The only fix was a new column.
Adding a new column is one of the most common database changes. It sounds simple, but in live systems, it can crush performance or cause downtime if done wrong. Schema changes touch storage, indexes, and application code. Done right, they keep services fast, stable, and ready for growth.
First, define the exact purpose of the new column. Decide on data type, nullability, and default values. Avoid implicit conversions that trigger table rewrites. In SQL, ALTER TABLE ADD COLUMN behaves differently across engines. PostgreSQL can add nullable columns instantly. MySQL may lock the table unless you use ALGORITHM=INPLACE or ALGORITHM=INSTANT in recent versions.
Plan the migration for real traffic. Test in staging with production-like data. Watch how queries and indexes interact with the new column. If the column will be indexed, create the index separately to reduce locking time. For high-write tables, consider backfilling values in small batches to avoid blocking transactions.