Adding a new column should be straightforward. In practice, it often breaks builds, blocks deploys, and triggers costly downtime. Schema changes are easy to write and dangerous to ship. The gap between local development and production widens fast when data is live.
A safe migration begins with a clear definition. Decide the column name, type, nullability, default values, and indexing. Plan for existing rows. If the table is large, adding a non-nullable column without a default can lock writes for minutes or hours.
Use transactional DDL where supported. Break changes into reversible steps. First, add the new column as nullable. Deploy. Backfill in small batches to avoid load spikes. Then enforce constraints. This staged approach lowers risk and keeps production responsive.