Adding a new column sounds simple. In production, it can break everything if you get it wrong. Schema changes ripple through code, services, and users. The right approach balances speed with safety.
First, define exactly what the new column will store. Lock down the data type, default value, and nullability. If defaults are required, set them in the migration to avoid inconsistent rows.
Second, choose the right migration strategy. For small tables, an online migration may be overkill. For massive datasets, use online schema change tools or phased rollouts. Test the migration on a clone of production data before touching live systems.
Third, deploy the schema change in a safe sequence. Add the new column first. Then update the application code to read from and write to it. Avoid back-filling during peak traffic. Run the backfill as a background job or in small batches to prevent locks and slow queries.