Adding a new column seems simple—ALTER TABLE and done. It is not. In production systems, each change can lock rows and block transactions. A poorly timed migration can slow APIs to a crawl.
The first step is defining the column with the right data type. Know your constraints before you write the DDL. Small types mean less space, faster reads. Avoid NULLs unless the value is truly optional. Adding default values can prevent errors in existing workflows.
Next is the migration strategy. For large datasets, online schema changes keep services responsive. Break up changes into safe steps. Write scripts that verify row counts before and after the migration. Record version numbers in the schema so deployments can detect mismatches.