Adding a new column is simple when the dataset is small. In production, with high traffic and terabytes of rows, the wrong approach locks tables, drops queries, and burns SLA budgets. The right approach is precise, tested, and plays well with your deployment pipeline.
A new column can be created with a straightforward ALTER TABLE statement, but the effect depends on your database engine and version. In PostgreSQL, adding a nullable column without a default is near-instant. Adding a column with a default on a large table can trigger a table rewrite, blocking writes until it completes. MySQL behaves differently: in recent versions with ALGORITHM=INSTANT, certain column additions are instant, but not all. Know your engine. Test on a clone.
For zero-downtime migrations, split the change into steps. First, add the new column as nullable with no default. Deploy. Then backfill the column in small batches, using a job or script that respects row-level locks and indexes. Finally, set the default and NOT NULL constraint in a later deployment when the data is ready.