Adding a new column sounds trivial, but in production it’s a high-stakes change. Schema changes touch both database integrity and application stability. If not planned, they cause outages, data mismatches, or blocked deploys. The right process makes the difference between a clean release and a broken pipeline.
First, decide how the new column will be introduced. In most relational databases, adding a nullable column without a default is fast. But adding a non-null column with a default rewrites the table, locking rows and spiking CPU. For high-traffic systems, that’s not acceptable.
Second, plan the rollout in phases. Create the new column nullable. Deploy application code that writes to both the old and new columns. Backfill data in batches to avoid overwhelming the DB. Once fully populated and read by production code, make it non-null and drop the old column.