Adding a new column is more than altering a table. It changes how data flows, how queries perform, and how teams ship features. Done well, it transforms your system without breaking a single deployment. Done poorly, it exposes code to silent failures and production downtime.
Start with clarity. Decide if the new column belongs in the existing table or if it signals a structural change. Review the constraints, indexes, and data types. Low-cardinality Boolean? Nullable timestamp? JSON for semi-structured data? Make the decision before you write the migration.
In most relational databases, adding a column with a default value can lock the table. For PostgreSQL, adding a column with a null default is instant; backfilling should happen in small batches to avoid blocking writes. For MySQL, the process can be online with the right engine settings, but watch migration time on large datasets.
Version control your schema. Store the migration in code, linked to the application release that uses it. This ensures the new column is deployed before application code depends on it.