Adding a new column is one of the most common schema changes in production systems. It sounds simple, but in live environments, even a single column can trigger downtime, data loss, or performance regressions if handled carelessly. The safest path is deliberate, small, and observable.
First, define the new column in your migration script without making it required. This avoids locking large tables during write-heavy periods. Use non-blocking operations supported by your database engine. In PostgreSQL, for example, ALTER TABLE ADD COLUMN with a default value will rewrite the table unless carefully staged. Skip the default at creation, then backfill in batches.
Second, deploy application code that can handle the column being NULL. Ensure all services in the stack are aware of the change before you enforce constraints. Observability tools should confirm query plans remain stable. Check that indexes are created only after data is in place; otherwise, index creation can overwhelm I/O.