Adding a new column should be simple. In practice, it can trigger downtime, migration delays, or failed deploys. The right approach depends on your database engine, traffic patterns, and deployment pipeline.
In PostgreSQL, ALTER TABLE ADD COLUMN is straightforward for nullable or default-value columns. But the command can lock the table if you add constraints or indexes. Plan the new column as nullable first, backfill the data in small batches, then add constraints in a controlled step.
MySQL behaves differently. Adding a column can be instant with ALGORITHM=INPLACE on supported versions, but fallback to COPY can cause long locks. Always check the execution plan before running migrations.
For distributed databases, adding a new column may require a schema change protocol across nodes. Schema metadata must stay synchronized to avoid query failures. In high-traffic systems, a rolling migration strategy ensures older services can still write and read without schema mismatches.