The table schema is tight. You need a new column.
Adding a column should be direct, fast, and safe. Whether the database handles millions of records or supports critical application logic, schema changes can’t break production. The process starts with clarity: define the column name, data type, constraints, and default values before touching the code. Document these decisions, because every untracked change becomes a future risk.
In SQL, ALTER TABLE is the command. For example:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
Run migrations in a controlled environment first. For large datasets, use tools that apply changes without locking the table for long. Consider backward compatibility—existing queries, API responses, and serialization formats must handle the new column gracefully. Deploy application code that can read and write to it only after verifying the migration is complete.