A missing new column.
Adding a new column sounds simple, but it’s where production errors often begin. The process touches the database, the ORM, the API, and the code that calls it. Done wrong, it locks tables, drops data, or blocks deploys. Done right, it rolls out safely with zero downtime.
First, define the new column in your migration file. Use explicit types, defaults, and constraints. Avoid implicit conversions that may rewrite an entire table. On large datasets, create the column as nullable, backfill in batches, then add NOT NULL constraints in a later deploy.
Second, update the model layer. Map the new column in your ORM or query builders. Keep backward compatibility by allowing both old and new code paths during the deploy window. In distributed systems, this prevents failures from staggered rollouts.