The query ran. It failed. The schema didn’t match. You need a new column.
Adding a new column is one of the most common updates to a database schema, but it carries risk if you treat it as trivial. The table is live, the data is moving, and indexes are in play. A careless change can lock rows, slow queries, or throw your app into errors.
First, define the column. Choose a name that is short, precise, and semantically correct. Avoid vague terms like “info” or “data.” Set the correct data type from the start. The wrong type will cause migrations later, which can be expensive if the table is large.
Second, plan the migration. In relational databases like PostgreSQL or MySQL, use ALTER TABLE with caution. On massive tables, this can lock writes. Look at online schema change tools such as pt-online-schema-change or native features like PostgreSQL’s ADD COLUMN which can be fast if no default is set. If you need a default, consider adding the column without a default then updating rows in small batches.