The code stopped working because the data shape changed. A new column appeared in the source table.
Adding a new column can be trivial or catastrophic, depending on how your system handles schema changes. In relational databases like PostgreSQL or MySQL, an ALTER TABLE ADD COLUMN statement updates the table definition instantly, but downstream pipelines often break when they expect a fixed structure. This is common in ETL jobs, analytics dashboards, and API integrations.
A new column impacts query performance if defaults or constraints are applied. In OLTP systems, adding a column with a default value can lock the table and block writes until complete. In OLAP environments, schema evolution usually happens in append-only fashion, but ingestion jobs may misalign fields.
Version control for database schemas is critical. Migration frameworks such as Flyway, Liquibase, or Rails migrations help track changes and enforce consistency across environments. Without it, each environment might introduce its own invisible variations. A column missing in staging but present in production can lead to hard-to-reproduce bugs.