The fix was simple: add a new column.
A new column changes the shape of a table without rewriting the whole system. It can store new data, support new features, and improve query clarity. In SQL, ALTER TABLE is the standard way to add a new column. The syntax is direct:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP;
Databases handle the change instantly for small tables. On large datasets, the operation can lock writes and consume resources. Plan the migration. Use a background process or a zero-downtime tool if needed. In PostgreSQL, adding a column with a default value can rewrite the table. Adding it without a default is fast. Apply defaults in a separate step to avoid downtime.
In analytics systems, adding a new column can open new dimensions for reporting. In transactional systems, it can store extra state without disrupting existing queries. Use indexing only when it improves read performance. Adding an index to the new column will slow writes and consume disk space.