The migration finished, but the table was wrong. One missing field, and everything downstream failed.
Adding a new column should be simple. In practice, it’s where small mistakes cause outages. The schema changes. The code changes. The data changes. If they do not align, you risk broken queries, failed deployments, or mismatched state.
A new column is not just an ALTER TABLE statement. You decide the type, the default, the nullability. You think about the size of historical data and the write load during migration. You plan the order: deploy code that can handle both old and new schemas, backfill data if needed, then switch the application to depend on it.
In PostgreSQL, adding a new column with a default non-null value can lock the table. For large datasets, that’s a problem. Use a nullable column first, backfill in batches, then set constraints. In MySQL, be aware of storage engine details and how altering tables might rebuild them in the background. In distributed databases, schema changes may propagate unevenly; keep that in mind for writes during the process.