Adding a new column should be fast, safe, and repeatable. It should not block writes. It should not crash your application. The wrong approach runs a full table rewrite and locks rows for too long. The right approach avoids downtime.
First, define the column with a default that does not require backfilling existing rows in a single transaction. In PostgreSQL, add the column as NULL without a default, then run an UPDATE in batches. In MySQL, avoid adding a non-null column with a default on a large table without first running a dry-run in staging. Each database engine handles schema changes differently—know the locking behavior before you begin.
If you need a new column in production, use a migration system that tracks state, applies changes in small steps, and fails forward. Keep migrations in version control. Avoid mixing schema changes with code changes in one deploy. Deploy the column. Deploy the code that uses it. Then backfill. Then commit to constraints.