Adding a new column sounds simple, but in systems that serve millions of requests, it can trigger expensive locks, break queries, and stall deployments. The right approach depends on your database engine, schema design, and migration strategy.
In relational databases like PostgreSQL or MySQL, adding a new column is often a metadata-only operation if it has no default value or constraints. But the moment you set a default, use NOT NULL, or recalculate existing rows, the migration can scan and rewrite entire tables. This turns a quick change into a blocking operation.
Best practice is to add the column as nullable with no default, verify application code handles its absence, then backfill data in controlled batches. Once the backfill is complete, add constraints in a separate migration. This reduces lock time, minimizes replication lag, and avoids long-running transactions that block writes.