When you add a new column to a database, the first choice is whether it allows nulls. A nullable column rolls out quickly, but can create hidden complexity in your business logic. A non-null column demands a default value or a two-step migration. This is where teams fail: skipping the staged approach, locking writes, or pushing an untested constraint into production.
Use an additive migration strategy. First, create the new column without constraints or indexes. Backfill data in controlled batches to avoid long locks or replication lag. Only after the data is complete and verified should you add NOT NULL or foreign key constraints. Each step should ship independently and be reversible.
Indexing the new column requires care. Adding an index on a live, high-traffic table can block queries if not done concurrently. In Postgres, always use CREATE INDEX CONCURRENTLY. In MySQL, verify your storage engine and use online DDL if supported.