The table is ready, but the data is incomplete. You need a new column, and you need it without breaking production or losing history.
Adding a new column sounds simple, but the wrong approach can lock your database, slow down queries, or trigger downtime. In high-traffic systems, schema changes must be atomic, safe, and reversible. That means defining your migration strategy before you touch production.
First, decide whether the new column needs a default value or can be nullable. Adding a column with a heavy default can rewrite the entire table on large datasets, which can be expensive. If you must set defaults, apply them after creating the column, in a separate step.
Second, consider deployment order. Create the new column before the application code starts writing to it. This avoids writes to a column that doesn’t exist yet. If you’re backfilling data, do it in batches to avoid locking issues and impacting performance.