When adding a new column to a database table, the first decision is compatibility. For existing production tables, adding a nullable column with no default value prevents full table rewrites. Default values—especially non-null—often trigger a full scan and write for every row. This can spike CPU, disk, and replication lag. If the application code depends on the column immediately, ship it as optional first. Then backfill in controlled batches.
For high traffic systems, run schema migrations online. PostgreSQL supports ADD COLUMN operations instantly if no default is set; MySQL can use ALGORITHM=INPLACE or INSTANT depending on the version. For large datasets, avoid adding indexes alongside the new column in a single step. Index creation is CPU-intensive and often locks writes. Split schema change and index creation into separate deploy phases.
Deployment safety comes from versioned migrations. Apply them consistently across environments. Use feature flags or conditional logic to read from the new column only after all environments have deployed the change. This prevents deserialization errors in background workers or API nodes that see partial state.