Adding a new column is common, but it can also be the reason a deployment fails. Even a small schema change can lock tables, block writes, or trigger downtime if it’s not planned and executed correctly. In production, these risks matter.
A new column changes the structure of a table. It requires an ALTER TABLE command in SQL, and depending on your database engine—PostgreSQL, MySQL, MariaDB, or others—the impact varies. With large datasets, adding a column that has a default value or a NOT NULL constraint can be costly. The database might rewrite the whole table. That’s minutes—or hours—of degraded performance.
The safest approach is to make schema changes in a way that’s backward-compatible and reversible. Start by adding the new column as nullable with no default. Then, in a separate step, backfill data in small batches to avoid load spikes. Only after the backfill completes should you add constraints or defaults. This method ensures that each migration runs fast and reduces the risk of table locks.