A schema can break under the weight of change. You add a feature. You run the migration. Suddenly the data model doesn’t fit. The fix is simple: a new column.
Adding a new column is one of the most common operations in relational databases. Yet bad execution can trigger downtime, locking, or even corrupt data. The right approach keeps your system stable and your deploys fast.
Plan the new column before you touch the database. Define its type and constraints. Understand its default values. If this column is critical for queries, benchmark the impact on indexes before adding it.
Use safe migrations in production. For large tables, adding a new column with a default value can lock writes. Instead, add it without defaults, then backfill the data in small batches. This prevents long locks and keeps latency predictable.