Adding a new column sounds simple. It isn’t. On production, schema changes can crush performance, lock tables, and break downstream services. That’s why the way you create a new column matters more than the column itself.
First, choose the right migration strategy. For small datasets, an ALTER TABLE ADD COLUMN is fast and safe. For large datasets, use online schema change tools like gh-ost or pt-online-schema-change. These avoid full table locks by copying data in chunks, then swapping tables in place.
Next, decide column type and constraints with precision. Changing a column later is more expensive than getting it right now. Think about indexing. Adding an index with the new column can improve query performance, but building it on a live system must be planned to avoid blocking writes.