Adding a new column sounds simple. In production, it can be dangerous. Schema changes touch live data, lock tables, and block writes. The larger the dataset, the higher the cost of a careless migration.
The first decision is whether the new column is required immediately. If the data isn’t needed in a single transaction, create it as nullable and backfill in batches. This avoids long locks. For high-traffic systems, schedule the migration during low-load windows or use online schema change tools like gh-ost or pt-online-schema-change.
Define the correct data type from the start. Changing types later is expensive and risky. Use precise constraints to keep data clean. If the new column will be indexed, add the index after the data is in place to prevent extra write overhead during the backfill.