Adding a new column is one of the most common schema changes, but it is also one of the easiest ways to disrupt production if done wrong. Schema migrations that add columns can lock tables, block writes, or fail under load. The process is simple in theory but demands precision in execution.
Define the column with the correct data type, default value, and constraints from day one. Avoid unnecessary defaults that force a full table rewrite unless they are critical. In large datasets, defaults should be applied in separate, non-blocking steps. Always test the migration on a staging database cloned from production before touching live data.
Use ALTER TABLE ADD COLUMN with care. On some databases like PostgreSQL, adding a nullable column without a default is instant. Adding a column with a non-null default can rewrite the entire table. MySQL versions before 8.0 may lock the table for longer than is acceptable. Understand the behavior of your specific engine before deployment.