The database waits. The query runs. You need a new column, and you need it without breaking production.
Adding a new column sounds simple. In practice, schema changes can lock tables, slow queries, and block deployments. The right approach depends on scale, database type, and uptime requirements.
In PostgreSQL, ALTER TABLE ADD COLUMN is fast for empty columns with no default or NOT NULL constraint. But adding defaults or heavy constraints rewrites the table, causing downtime. MySQL’s behavior varies with versions; newer releases support instant column addition under certain conditions, but older versions require expensive table copy operations.
Before adding, audit your schema. Name the column for clarity and long-term consistency. Check indexes—adding one immediately can double the migration cost. Use background migrations if possible. Split changes into stages: create column, backfill data, add constraints last. This reduces risk.