The migration froze halfway. A single table blocked the release. You needed a new column.
Adding a new column sounds simple. In large systems, it’s where deployments break. Schema changes touch data at scale. They change storage layouts, indexes, and query plans. Get it wrong, and services go down.
First, define the new column with clear types. Use the smallest data type that supports the functionality. Set defaults to avoid null issues in existing rows. If the column must be indexed, consider the write amplification cost before creation.
Second, apply the change in a controlled rollout. Execute ALTER TABLE during low-traffic windows or use online schema migration tools for zero downtime. When using MySQL, tools like pt-online-schema-change or gh-ost can backfill data without locking the table. In PostgreSQL, ADD COLUMN is fast if no default or not-null constraint is applied—then gradually update data, and finally enforce constraints.