Adding a new column is more than a schema change. It’s a point of truth, defining what your system can store and how it can evolve. The wrong approach can lock you into downtime, broken queries, or cascading bugs. The right approach keeps services running while the data model grows seamlessly.
Start by deciding if the new column is nullable or will have a default value. This determines how existing rows will be handled during the update. If non-nullable, prefill the data or run a backfill before enforcing constraints. Use migrations that break the change into safe steps: first add the column, then populate, then lock in constraints.
For live systems, run migrations online. Many databases allow adding a new column without blocking reads. In PostgreSQL, ALTER TABLE ... ADD COLUMN is fast if you include a default later, not during the add. In MySQL, use ALGORITHM=INPLACE to avoid rebuilds. Keep indexes off until data is loaded to prevent excessive write amplification.