The database is live, but users now need a new column.
Adding a new column sounds simple. In production, it can break everything if done wrong. Schema changes touch the core of your application: queries, indexes, constraints, and the shape of your data. A careless commit can lock tables, spike CPU, or block writes.
To create a new column safely, start with analysis. Check how the table is used in critical queries. Identify joins, foreign keys, triggers, and batch processes that depend on its structure. Map the read and write load. Set up the change in a staging environment with realistic data.
Use a migration strategy that avoids downtime. For large tables, add the new column without defaults or constraints, then backfill in batches. Keep writes open while populating data to avoid blocking. Apply constraints after backfilling to maintain integrity.