Adding a new column in a database is simple in theory, but high-risk in practice. Schema changes can lock tables, block writes, or cause downtime if not planned with precision. The size of your dataset, the database engine, and the migration strategy determine whether the change is instant or brings your service to a halt.
For relational databases like PostgreSQL or MySQL, adding a column with a default value often rewrites the entire table. On large tables, this can mean minutes or hours of blocking locks. Even without defaults, certain column types and constraints still trigger slow operations. In high-traffic systems, that risk is unacceptable.
Safe deployments require a migration plan. First, add the new column without defaults or constraints. Then backfill data in small batches to avoid saturating disk I/O. Finally, apply constraints and defaults in separate statements once backfill is complete. For multi-tenant or sharded architectures, repeat the process per shard in isolation.