A new column sounds simple. In practice, it can ripple through code, queries, and migrations. Done wrong, it locks your tables, slows your service, and burns through your deployment window. Done right, it ships in seconds with zero downtime.
When adding a new column to a production database, the first choice is always: online or offline migration. Online migrations avoid blocking reads and writes. They create the column instantly as metadata and backfill data in small batches. Offline migrations halt the world. Large datasets make this risky, often impossible, without impacting SLA.
For relational databases like PostgreSQL or MySQL, adding a nullable column with no default is fast. Adding a non-nullable column with a default value forces a full table rewrite. That’s why seasoned teams add the column as nullable first, deploy, then run a backfill job. Once data is complete, they set the NOT NULL constraint.
Indexes tied to the new column need similar care. Create them concurrently when the database supports it. Monitor replication lag before and after. Watch for query plans that shift unexpectedly due to the new index or statistics updates.