The logs pointed to a missing column. Adding a new column sounds simple, but the smallest schema change can ripple through APIs, queries, and runtime behavior. Done carelessly, it can stall deploys, corrupt data, or take services offline.
A new column alters both the structure of a table and the contract between services. In relational databases like PostgreSQL or MySQL, the operation triggers an implicit table rewrite unless handled with the right strategy. For high-traffic systems, locking the table for even a few seconds can cause timeouts. Without defaults or null handling, the change can fail when inserting existing rows.
The safest approach to adding a new column is incremental. First, add the column with a default value defined at the application layer, not as a blocking DDL default. Populate it in batches with background jobs. Update queries and code paths to support both the old and new schema during deployment. Only after the rollout is stable should you enforce constraints at the database level.