Adding a new column is one of the most common schema changes in any production database. It sounds simple, but the impact can be large. Reducing downtime, keeping queries fast, and avoiding locks is the difference between a clean deploy and a late-night rollback.
First, define the column in your migration script. Be explicit with type, constraints, and defaults. Avoid null defaults unless necessary; they can force slow table rewrites.
Second, run the migration in a way that minimizes locking. In MySQL and PostgreSQL, newer versions support concurrent column addition for certain changes. If your database version lacks this, consider a two-step approach: add the column without constraints, backfill in small batches, then apply constraints.
Third, update application code in phases. Deploy changes that can handle both the old and new schema before the column exists. Then deploy the migration. Finally, deploy code that uses the new column. This creates breathing room and lowers deployment risk.