Adding a new column sounds simple. It never is. In production, it can trigger deadlocks, break queries, slow down indexes, and cause deployments to stall. Every engineer who has run ALTER TABLE without a plan has paid for it. The right approach avoids downtime and keeps application state consistent.
A new column changes more than the table definition. It affects migrations, ORM mappings, API payloads, and downstream analytics. If the column is nullable, you must decide on defaults, backfill strategies, and whether to lock writes during updates. If it is non-nullable, you must ensure that existing rows comply before the change.
For large datasets, an online migration is the safest path. Use database tools that can copy data in chunks, build the new column in shadow, and swap it atomically. In PostgreSQL, ADD COLUMN is fast for nullable fields without a default. But adding a default value will rewrite the table, locking it until completion. MySQL online DDL can help, but watch for triggers that still lock on commit.