The database was ready, but the schema was wrong. You needed a new column, and every second counted.
Adding a new column sounds simple. In practice, it can break deployments, lock tables, and stall production traffic. Done right, it is fast, safe, and invisible to users. Done wrong, it means downtime, lost data, and rollback panic.
A new column should start with a clear migration plan. Use ALTER TABLE with care. On large datasets, choose an online migration tool to avoid table locks. In PostgreSQL, ALTER TABLE ADD COLUMN without a default is instant, but setting a default on millions of rows can be slow. In MySQL, adding a new column can block writes unless run with ONLINE or INPLACE options.
Before applying the change, test it against a snapshot of production data. Validate that the migration plan works within your deployment window. Consider backwards compatibility — first deploy code that can handle both old and new schemas. Then run the migration. Finally, switch to code that depends on the new column.