The schema had changed, but no one had added the new column.
A new column is rarely just a field in a table. It is a change in your data model, your queries, your indexes, and the assumptions in your code. If you do it wrong, you introduce latency, null errors, and deployment rollbacks. If you do it right, the rollout is smooth, queries stay fast, and you can ship without a maintenance window.
The first step is defining the new column with precision. Decide data type, constraints, and default values. Defaults keep old rows valid without breaking inserts or updates. Avoid making the change in production without testing it against a copy of live data.
Next, plan the migration. In relational databases, adding a new column is often fast for metadata-only changes, but can be slow and locking for large tables. For PostgreSQL or MySQL, watch for type conversions and disk I/O. Break the process into stages: add the column, backfill in small batches, then update application logic to read from and write to it.