Adding a new column seems simple. In practice, it can break queries, stall writes, or cripple performance if done wrong. The key is planning for both schema integrity and application consistency.
First, choose the right migration strategy. For small tables, a direct ALTER TABLE ADD COLUMN might be fine. For production-scale datasets, use online schema change tools such as gh-ost or pt-online-schema-change. These stream changes without blocking traffic.
Second, define default values and nullability explicitly. Implicit defaults can cause silent app errors. Use constraints that match actual business logic from the start.
Third, deploy in phases. Add the column first. Deploy code that writes to it next. Only after data backfills should your reads depend on it. This avoids mixed-schema errors in distributed environments.