The query hit the database, but the schema had changed—there was no column for the data it needed.
Adding a new column should be simple, yet in production systems it demands precision. A ALTER TABLE ... ADD COLUMN is fast on small tables, but on large datasets it can lock writes and cause downtime. Databases like PostgreSQL handle ADD COLUMN with default NULL values instantly, but setting a default that’s not NULL can trigger a costly table rewrite. MySQL behaves differently, often rewriting the whole table regardless.
When planning a new column deployment, verify its impact on indexes and constraints. Decide if the new column should allow NULL, have a default, or require a type conversion. Test in a staging environment with production-size data. Where possible, split the migration: first add the nullable column, then backfill data in batches, and finally enforce defaults and constraints. This approach reduces locks and preserves availability.