The issue was a missing new column in the production database.
Adding a new column sounds simple. It rarely is. In live systems, schema changes touch performance, availability, and application logic. Missteps can cause downtime or data loss. Done right, a new column integrates seamlessly into existing queries, indexes, and workflows without slowing the system or breaking dependent services.
Before adding a new column, define its type and constraints precisely. Nullability, default values, and indexing should be explicit. Avoid implicit defaults that can become hidden performance problems. Run the change in a staging environment with production-like data sizes. Measure the impact on write performance and query execution plans.
In SQL databases, use ALTER TABLE with care. For large tables, adding columns can lock writes or trigger table rewrites. Online schema changes or chunked updates can mitigate this. In NoSQL systems, ensure your ORM or application layer can handle documents with mixed versions during rollout.