Adding a new column sounds simple. It often is. But mistakes here can ripple through production data, break deployments, and burn hours in rollback. The right process makes it safe, fast, and repeatable.
First, define the new column with explicit types and constraints. Be clear on nullability. Avoid silent defaults unless they serve a specific use case. Explicit beats implicit.
Next, plan for backward compatibility. Migrations that add a new column should not block reads or writes. Use additive changes first, then roll out dependent code that writes to and reads from the new column. Delay dropping old columns until all systems have migrated.
When dealing with large datasets, use batched updates. Add the column, deploy code that can handle it, then backfill data in controlled chunks. This avoids locking and performance degradation.