The database schema was solid until the new feature request landed on your desk. Now everything depends on a single change: adding a new column.
A new column in a relational database sounds simple. But the execution decides if your system stays fast or grinds under load. The wrong migration strategy can lock tables, block writes, and trigger outages. The right one lets you adapt in production with zero downtime.
Before you run ALTER TABLE, assess table size, row count, and traffic patterns. In MySQL and Postgres, adding a nullable column with a default value can rewrite an entire table. On large datasets this is dangerous. Instead, create the new column without defaults, then backfill data in small batches.
Use transaction-safe DDL where possible. Many modern databases support concurrent schema changes. In Postgres, ADD COLUMN without a default is fast, but adding NOT NULL later should follow a staged approach: