This change looks simple. It’s not. Adding a new column in a busy database impacts performance, deploy workflows, and future maintenance. The schema migration step can block writes or reads, trigger locks, and force a full table rewrite. Done wrong, it can slow down your release or even bring down the service.
First, choose your migration strategy. In relational databases like PostgreSQL or MySQL, adding a nullable column with a default value can rewrite the table. Avoid immediate defaults when possible. Instead, add the new column as NULL, then backfill data in small batches. Once the data is in place, set the default and constraints in a second migration.
For large datasets, use online schema change tools. In MySQL, pt-online-schema-change or gh-ost let you add a new column without downtime. In PostgreSQL, adding a column without a default is cheap, but adding it with NOT NULL requires either a fast default or a staged rollout with backfill.