Adding a new column sounds simple. It is not. In production, the wrong change can trigger downtime, break integrations, or corrupt data. Safe schema changes require planning, precision, and verification at every step.
Define the new column in your migration with explicit type, nullability, and default values. Avoid using implicit conversions. If the new column stores sensitive data, decide up front on indexing and encryption. For large tables, use an online schema change tool to avoid locking writes.
Backfill data in small batches. Monitor replication lag. Keep deployments reversible—write migrations and rollback scripts together. Test how the new column behaves with existing queries. Check both ORM-generated SQL and raw queries for performance regressions.