Adding a new column seems simple until it meets production scale. Done wrong, it locks tables, blocks queries, and stalls deploys. Done right, it ships without users noticing. The difference is in how you design, migrate, and backfill.
First, define the column with precision. Set the correct type, constraints, and defaults before touching live data. Avoid expensive operations in a single step. On large datasets, break the change into smaller, non-blocking migrations.
Backfill data in batches. Limit the transaction size to protect performance. Monitor error rates and replication lag. For large changes, run shadow writes to validate integrity before switching application logic to depend on the new column.