The query hit the database, but the result was wrong. The schema had changed. A new column existed, and no one told the code.
Adding a new column is one of the most common schema changes. It can be harmless, or it can break production if done without control. Databases are strict about structure. Applications are strict about data formats. Mismatches cause errors, data loss, or subtle bugs that surface weeks later.
A new column should have a clear purpose. Define its type, constraints, default values, and nullability before touching production. Test locally and in staging with real sample data. Verify migration scripts in version control. Wrap schema changes in transactions when possible to avoid partial writes.
For relational databases, decide between ALTER TABLE and shadow table migrations. ALTER TABLE is faster for small datasets but can lock large tables and block writes. Shadow migrations create a new table with the new column, copy data in chunks, then swap. This is safer for high-traffic systems.