Adding a new column sounds simple. It rarely is. In production, a new column can break queries, trigger locks, or slow a hot path. The key is to make schema changes that don’t interrupt live traffic.
First, design the new column with its purpose clear. Decide its data type, default value, and whether it allows NULL. Avoid defaults that force a table rewrite. Instead, create the column as nullable, backfill in small batches, then apply constraints later.
Second, deploy with zero downtime. In PostgreSQL, adding a nullable column is fast, but adding a column with a default value before 11 requires rewriting the table. In MySQL, adding columns to large InnoDB tables can lock writes unless you use ALGORITHM=INPLACE or ALGORITHM=INSTANT. Always verify the migration plan against the actual engine version.