Adding a new column can be simple or a dangerous operation depending on scale, constraints, and live traffic. The goal is zero downtime, no broken queries, and no data loss. To get there, you must know the exact effect of the schema change on reads, writes, and indexes.
Before you add the column, audit the table size. For small tables, a straightforward ALTER TABLE ADD COLUMN may work with negligible impact. For large tables under load, online schema change techniques are essential. Tools like gh-ost or pt-online-schema-change can add a new column without locking writes.
Choose the column type and default value carefully. Non-nullable columns with defaults can force a full table rewrite. If you must use them, consider adding the column as nullable, backfilling data in batches, then enforcing constraints. This reduces the lock time.
Add indexes only after data backfill unless you can tolerate extended lock time. Think in terms of operations per second and replication lag. On replicas, schema changes can delay or block replication. Test the change on staging with production-like size and query load.