Adding a new column should be simple. At scale, it isn’t. Schema changes can lock rows, block writes, or break running code. The impact grows with data size and request velocity. Without a plan, one ALTER TABLE can stall a production system.
First, define the new column with clear data type and constraints. Avoid defaults that require backfilling every row at once. Use nullable fields or lightweight defaults to keep the migration fast. In PostgreSQL, adding a nullable column without a default is almost instant, because it only updates the metadata. In MySQL, behavior depends on storage engine—check before deploying.
Second, deploy schema migrations in stages. Add the column. Backfill data in small batches. Then enforce constraints or make the column non-nullable. Rolling changes keep the database responsive and reduce downtime risk.