Adding a new column is not a routine checkbox. Done well, it extends the schema, enables new logic, and keeps existing workflows intact. Done poorly, it locks tables, slows queries, and triggers downtime you can’t afford.
Start by defining the column with precision. Type, nullability, defaults, and constraints must be explicit. Avoid automatic assumptions from your ORM. The database should meet the change on your terms, not guess your intent.
In production, a schema migration should be atomic and safe. Use tools that can stage changes online without blocking reads or writes. For massive tables, consider creating the column as nullable, then backfilling rows in controlled batches. This prevents write amplification and protects indexes.
If the column needs a default value, set it only after backfill. In databases like PostgreSQL, adding a column with a non-null default rewrites the entire table—a costly operation. Split the migration into steps: add column, backfill in small increments, add constraints.