The table had outgrown itself. Queries slowed. Data needs changed. The only fix was to add a new column.
A new column sounds simple. It isn’t. Adding it in production can block writes, lock rows, and corrupt performance if done wrong. The schema may be small now, but indexes, constraints, and migrations stack risk fast. The right approach depends on your database engine, the size of your dataset, and your deployment process.
In SQL, the basic pattern is clear:
ALTER TABLE orders ADD COLUMN shipped_at TIMESTAMP;
That works for development. In production, you need more. For PostgreSQL, check if a default value forces a table rewrite; if so, add the column null first, then backfill in batches. For MySQL and MariaDB, consider ALGORITHM=INPLACE migrations to avoid full table copies. For cloud environments like Aurora or AlloyDB, test migration time on a snapshot before live.