The query ran, the table returned, but the data was wrong. You scan the schema and see the missing field. It needs a new column.
Adding a new column sounds simple, but in production it can be costly. You have to consider migration speed, locking behavior, default values, indexing, and backward compatibility. On small tables, an ALTER TABLE ADD COLUMN runs fast. On large datasets, it can block reads and writes. Some database engines write the entire table again. Others store a lightweight metadata change—if the column is nullable without a default.
For PostgreSQL, adding a new column with NULL as default is metadata-only and completes quickly. Adding a non-null column with a default forces a rewrite and may cause downtime. With MySQL, older versions lock the table fully; newer versions with ALGORITHM=INSTANT can create certain columns instantly. In distributed databases like CockroachDB, online schema changes are common, but you must still handle schema versioning in your code to prevent mismatches during rollout.