The query runs, the data returns, but the schema has changed. You need a new column.
Adding a new column is one of the simplest and most dangerous operations in a production database. Done right, it unlocks features, speeds iteration, and keeps teams shipping. Done wrong, it freezes deploys, breaks queries, or locks rows under load.
Start by defining the new column explicitly. Use a precise name. Avoid ambiguous terms. Set the correct data type from the start. Migrations are cheap on empty tables, expensive on large ones. For large datasets, consider adding the column as nullable first, then backfilling in small batches.
Avoid defaults that trigger a full-table rewrite unless necessary. In PostgreSQL, adding a column with a constant default rewrites data before PostgreSQL 11. On MySQL, adding a column may lock the table depending on engine and version. Check your database’s release notes before running migrations in production.