Adding a new column is one of the most common schema changes in production. Done right, it feels simple. Done wrong, it causes downtime, query failures, and broken deployments. Speed matters, but so does safety.
First, define the exact type and constraints. Pick NOT NULL with a default value only if you are sure the migration can handle it without locking the table for too long. On large datasets, that lock can block writes and trigger cascading failures. If you must backfill, split the process into two steps: create the column as nullable, then update in batches.
Second, ensure your application code can handle both the old and new schema during deployment. Roll out schema changes before pushing code that depends on them. This dual-compatibility step prevents errors when rolling back or deploying across multiple servers.