You run the migration in local. It works. Tests pass. Then production breaks because millions of rows choke on the lock, the replication lag spikes, and the alert channel fills with red. Adding a new column sounds simple, but in a real system it’s a high‑risk change.
A new column changes the contract between your application and its database. It can break queries, invalidate caches, and trigger full table rewrites depending on the database engine and column type. Even if the change is backward‑compatible, deploying it without a plan can stall your release or take your service offline.
The right approach starts with understanding how your database handles schema changes. In PostgreSQL, adding certain column types without defaults is fast. Adding a column with a default value before version 11 rewrites the whole table. In MySQL, adding a column may require a full table copy for older storage formats, while newer versions and engines like InnoDB can handle it online.