Adding a new column to a table sounds simple. In practice, it can change schema contracts, break queries, and delay deploys. In production systems, the wrong ALTER TABLE can lock rows, block writes, and trigger cascading failures. The right approach is precise, staged, and repeatable.
Start by defining the new column with a clear data type and nullability. Avoid introducing non-null columns with no default value into live tables—this can cause full table rewrites. Use NULL defaults, then backfill in small batches. After the backfill is complete, enforce constraints in a separate migration.
For relational databases like PostgreSQL or MySQL, add indexes only after data is populated to keep write performance stable. Monitor query plans to ensure no regressions in read performance. Keep schema changes version-controlled and deployed through a continuous migration framework.