The query runs. The result is wrong. The fix is a new column.
A new column changes the schema. It can store fresh data, track new states, or support new features without altering existing logic. In relational databases like PostgreSQL or MySQL, adding a column is straightforward, but the cost depends on the size of the table and the type of data. A well-planned column addition avoids downtime, prevents unexpected nulls, and ensures indexes and constraints align with the new field.
Schema migrations are not just code; they are operations. A careless migration can lock tables, spike CPU, or block writes. To add a new column safely, use tools and patterns that handle live traffic. Break changes into steps: create the column, backfill data in batches, then apply constraints. Always test migrations on staging with production-sized datasets.