The schema was perfect until the moment the request came in: add a new column.
A new column is never just a column. It changes structure, queries, indexes, and performance profiles. In production, it can mean locks, table rewrites, and downtime if you get it wrong. The goal is precision with zero disruption.
Start by assessing the migration path. In PostgreSQL, adding a nullable column without a default is instant. Adding defaults to existing rows forces a full rewrite. In MySQL, version matters—some releases handle new columns in place, others rebuild the table. For large datasets, the wrong approach can block writes for hours.
Plan for the data type and constraints up front. Use NULL and backfill data asynchronously when possible. If you need a NOT NULL constraint with a default, add the column as nullable first, perform background updates, then enforce constraints in a separate migration.