Adding a new column sounds trivial until it runs live. In production, schema changes can stall transactions, lock tables, and block reads and writes. Downtime is expensive, and even seconds can cascade into failures. The right approach avoids both data loss and service impact.
A new column should be introduced in a phased, backwards-compatible way. First, run an ALTER TABLE to add the column with a default NULL value. This avoids recalculating rows during creation. On large tables, online DDL or tools like gh-ost or pt-online-schema-change can create the new column without locking.
Once the column exists, update application code to write to both the old and new schema versions. Monitor replication lag and error rates. Backfill data in small batches to prevent I/O spikes. Use controlled rollouts, and only switch reads to the new column when backfill is complete and the data is validated. This sequence prevents version drift and partial migrations.