The data model had shifted, but no one updated the schema. The missing link was a new column.
Adding a new column is simple in theory. In practice, it can bring down production if done wrong. Schema changes touch every layer: database, API, cache, and client. A careless migration locks tables, spikes latency, and leaves services waiting.
Begin by identifying the exact name, type, and constraints for the new column. Avoid null defaults unless they have a defined meaning. Decide if the new field belongs in the main table or a related one. For high-traffic systems, use an online schema migration tool to avoid downtime.
Run migrations in stages. First, add the new column without constraints. Then backfill data in small batches, watching for replication lag. Only after the backfill is complete should you enforce NOT NULL or unique constraints. Indexes should be created last to avoid heavy locking during writes.