The table was not enough. You needed clarity. You needed a new column.
A new column changes the shape of your data, the queries you write, the way your system thinks. It is not decoration. It is structure. With the right column, you can join faster, search faster, and make constraints that your database enforces instead of your code.
When you add a new column to a table, the first decision is type. Text, integer, boolean, date—choose the smallest type that fits the job. Smaller means faster scans and cheaper storage. If the column must link to another table, use foreign keys instead of manual references. Define indexes when needed, but avoid indexing every new field blindly. Every index speeds some queries and slows writes.
Think about nullability before you run the migration. A nullable column leaves gaps; a non-null column forces data integrity. If you add a non-null column to an existing table with millions of rows, set a default or backfill data in batches. Doing this without locking the table requires careful migration strategy—online schema changes, concurrent indexing, or adding computed columns first.