The schema is broken. The migration fails. You need a new column.
Adding a new column should be simple, but production databases don’t forgive mistakes. Wrong defaults trigger locks. Null constraints crush inserts. Indexes slow writes. To survive, you need precision, speed, and a plan.
First, map the change. Define the column name, type, and constraints. Decide if it can be null during rollout. Avoid wide types unless required; smaller is faster to scan and cheaper to store.
Next, stage the migration. In large datasets, add the column without defaults, then backfill in batches. This prevents long locks and keeps latency under control. Monitor query performance during backfill; watch for cache pressure.