Adding a new column is one of the most common and critical database changes. It looks simple. It is not. A single migration can impact performance, data integrity, and deployment speed. Done wrong, it can block production. Done right, it is invisible.
A new column changes how your application reads, writes, and indexes data. You must design the column type, constraints, and defaults for current and future needs. If the table is large, every row must be touched. That means locking strategy, batch updates, or zero-downtime migration techniques.
Start with schema design. Choose the smallest column type that supports the data. Define NOT NULL and default values if possible. Avoid storing data you can derive. Then plan the migration. For critical tables, add the column without constraints, backfill in small batches, and only then apply constraints. This reduces lock time and avoids blocking queries.