The database was ready, but the schema was not. The team needed a new column, and they needed it without breaking production.
Adding a new column sounds simple. It’s not. It can trigger locks, slow queries, stall deployment pipelines, and break application logic hidden deep inside your stack. A misstep can turn a five‑second change into an hours‑long outage.
The safest path is to treat a new column as both a schema change and an interface change. First, define its purpose. Is it nullable? Does it need a default value? Will it impact indexes or foreign keys? Making these decisions up front prevents downstream rewrites and accidental performance hits.
In PostgreSQL, ALTER TABLE ADD COLUMN is fast for empty tables but can be costly for large datasets. For MySQL, adding a column may cause a full table rewrite, depending on the storage engine. Modern systems like CockroachDB can handle schema changes more gracefully, but even then, monitor performance metrics during the rollout.