The database schema had to change and the query failed. The missing piece was a new column.
Adding a new column sounds simple. It is not. Done wrong, it locks tables, blocks writes, and pushes latency through the roof. Production outages have started this way. The right process avoids downtime and keeps the deployment smooth.
First, decide on the column name and data type. This is not cosmetic. Name changes after deployment are expensive. Pick a type that matches the data at its source. Always set NULL or sensible defaults before the column goes live.
Second, choose between online and offline schema changes. In MySQL, ALTER TABLE without precautions can lock the table. Use ALGORITHM=INPLACE or tools like gh-ost or pt-online-schema-change for large datasets. PostgreSQL handles many ADD COLUMN operations instantly, but still watch for indexes or constraints that trigger rewrites.