Adding a new column sounds simple. In production, it can break queries, slow migrations, and cause unapplied schema drift. The key is precision. You must add the column without downtime, without corrupting data, and without blocking dependent services.
First, define the column with exact specifications: name, type, default value, nullability. Decide if it will be nullable at creation, or if it will require backfilling data. Mistakes here compound downstream.
Second, handle migrations in small, atomic steps. For large datasets, batch updates prevent locks from stalling critical paths. Consider feature flags or versioned migrations to roll out schema changes gradually, keeping old and new code paths alive until the switch is complete.