Adding a new column in a production database is one of those changes that seems simple until it isn’t. Performance, locking, and schema drift can turn a one-line migration into a risk you can’t ignore. The right approach depends on your database engine, your data volume, and how zero downtime you need to be.
In PostgreSQL, ALTER TABLE ADD COLUMN runs fast if you set a default of NULL and no constraints. Adding a default value without backfilling will keep the operation nearly instant. For large datasets, backfill in batches, not in a single transaction.
In MySQL, adding a new column can lock writes. For huge tables, use ALGORITHM=INPLACE or tools like pt-online-schema-change to keep the service online. Always test migrations against a clone of production before running them live.