Adding a new column sounds simple, but the impact ripples through queries, indexes, APIs, and production workloads. The wrong approach can lock tables, cause downtime, or corrupt data. The right approach preserves performance and keeps services online.
First, define the column with precision. Use the minimal data type and constraints needed. Avoid overly wide columns that waste storage and slow scans. If defaults are required, prefer lightweight ones that avoid rewriting the full table.
Second, choose the migration strategy. For small tables, a direct ALTER TABLE ADD COLUMN may be safe. For large or critical tables, use an online schema change tool to avoid blocking writes. Test the change against a realistic dataset before touching production.