Adding a new column sounds simple. It isn’t. Schema changes freeze queries, lock rows, and risk downtime if done bluntly. The wrong ALTER statement at the wrong time can block writes and send alerts across your Slack channels.
A new column requires precision. You must choose the right data type, set defaults carefully, and decide if it should allow NULL values. Adding an index on creation can slow the migration; skipping it might force costly later changes. Migrations in large datasets demand safe patterns—online schema changes, background jobs, and controlled rollouts. Tools like pt-online-schema-change or native database features can prevent full table locks.
In production, you don’t just CREATE or ALTER. You version your changes, run them in staging, and test with real data samples. You plan for rollback. You monitor query times before and after. Every step is measured.