The database waits. You have data to store, but the schema is missing a field. You need a new column.
Adding a new column should be simple, but in production it is never trivial. Schema changes touch live systems, high-traffic queries, and replication. Done wrong, they lock tables, spike CPU, or cause downtime. Done right, they ship fast and safely.
A new column can mean different things depending on the database. In PostgreSQL, ALTER TABLE ... ADD COLUMN is straightforward if you add it without a default. With a default or NOT NULL, it rewrites the table, which can be slow on large datasets. In MySQL, adding a new column may require a full table copy unless you use an online DDL strategy. Tools like gh-ost or pt-online-schema-change help avoid blocking writes.
Plan before running the command. Measure the table size. Benchmark the impact in staging. Avoid adding computation-heavy defaults during the migration. If constraints are required, add them in a separate step after the column exists. For high availability setups, ensure read replicas apply the change without lag.