The solution was obvious: add a new column.
A new column changes shape. It shifts the schema. It unlocks queries that were impossible seconds ago. In relational databases, adding a column means expanding your table’s structure without losing the existing rows. It’s a small schema migration with lasting impact.
The most common use cases for a new column include storing new attributes, tracking states, logging timestamps, or holding computed values for performance. Done right, a new column lets you answer questions faster and simplify joins. Done wrong, it brings unnecessary complexity, extra storage costs, and index bloat.
Before adding a new column, decide on the exact data type. Match the column to the data’s true nature—integer, string, boolean, JSON. Consider nullability. Decide on defaults. Think about indexing for future queries, but avoid indexing blindly. Every index has a write penalty.