Adding a new column to a database table sounds simple. It rarely is. Schema changes can lock tables, block writes, and break code paths you forgot existed. The risk grows with the size of your dataset and the complexity of your application.
Before adding a new column, confirm the reason it exists. Avoid storing values that can be derived or joined from other data. Validate that the column type fits expected queries and indexes. Using the wrong type now means costly rewrites later.
Decide on default values. For large datasets, setting a default and NOT NULL in one migration can lock an entire table. Safer patterns include adding the nullable column first, backfilling in batches, and then enforcing constraints.
Check application code for assumptions about the table’s shape. Deploy schema changes in sync with code updates so both old and new versions can run without errors. This prevents downtime during rollout.