The query landed. The schema didn’t match. You needed a new column.
Adding a new column sounds simple. In production, it can be a minefield. Every database, every ORM, every migration tool has rules and edge cases. If you get them wrong, you lock tables, you lose writes, or you break the build.
A new column in SQL starts with ALTER TABLE. You define its name, type, and constraints. You decide if it can be null or needs a default value. For large datasets, adding a column with a default can trigger a full table rewrite. That means downtime. To avoid it, set the column nullable first, backfill data in batches, then enforce constraints later.
In PostgreSQL, adding a nullable column is fast. Adding a column with a default to millions of rows can be slow unless you use the DEFAULT in metadata-only form (ALTER TABLE ... ADD COLUMN ... DEFAULT ...). Watch your Postgres version — newer releases optimize this. In MySQL, the impact depends on storage engine and version. For InnoDB, older versions rewrite the table; newer ones can handle changes online with ALGORITHM=INPLACE.