Adding a new column is never just adding a new column. It changes schema, shifts queries, and ripples through code paths. The wrong move locks a table. The right move lands safely in production with zero downtime.
First, define the column’s purpose with precision. Choose the data type that matches the actual use, not the one that seems “good enough.” Align nullability and defaults with real business rules. A poorly chosen default can mask bugs for months.
Second, plan the migration path. On small datasets you can alter the table directly. On large ones, use a phased approach. Add the new column without a default, backfill in controlled batches, then enforce constraints. This avoids long locks and keeps latency stable.