The database was failing. Reports stalled, queries crawled, and a single missing field kept the team from shipping. The fix was clear: add a new column.
A new column sounds small, but it changes the shape of your data. In SQL, you use ALTER TABLE to add it. In PostgreSQL, MySQL, or MariaDB, the syntax is straightforward:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
The choice of data type matters. Text fields consume more space than integers. Timestamps require attention to time zones. Boolean columns seem simple, but null values can lead to subtle logic errors.
Before adding a new column to a large production table, check index impact. Adding an indexed column can slow down writes. Adding a column without defaults on huge tables may lock rows. Use tools like pg_online_schema_change for PostgreSQL or gh-ost for MySQL to apply changes without blocking.