The query finished running, but the data didn’t match the model. You need a new column.
A new column changes the shape of your database. It adds a field, stores new information, and makes it available for every row without breaking existing constraints. The process sounds simple, but in production systems it can be the difference between smooth deployment and hours of downtime.
Design the new column with intent. Define the name, data type, default values, and whether it can be null. Avoid vague names. Use types that match the data you will store. If the column will hold large text or arrays, check performance impacts before adding it.
When adding a new column to SQL tables, use migrations. In PostgreSQL and MySQL, ALTER TABLE is the basic command. For large tables, add the column without heavy operations like full-table rewrites. PostgreSQL can add a nullable column instantly in many cases. To set defaults without locking writes, create the column as nullable, then backfill data in small batches.