Adding a new column is one of the most common schema changes in any database. Yet it carries weight. Production data is fragile, migrations are irreversible without care, and the wrong approach can lock tables, slow queries, or block deployments. Doing it right means balancing speed, safety, and performance.
A new column changes the shape of your data. It can be optional (NULL) or required (NOT NULL), with or without default values. Each choice has downstream effects. Nullable columns avoid costly rewrites but push complexity into application logic. Non-null columns with defaults can be backfilled in place, but on massive tables, that becomes a blocking operation.
Certain databases, like PostgreSQL, can add a column with a constant default nearly instantly starting in version 11. Others will rewrite every row. MySQL behaves differently depending on the storage engine and version. Always test schema changes against production-sized data. Measure lock times. Validate indexes. Confirm that the migration will not timeout in your CI/CD pipeline.