The query ran fast. The result was clean. But the schema was missing a new column.
Adding a new column sounds trivial until you face live traffic, strict uptime, and terabytes of data. The goal is zero downtime, predictable performance, and a clear migration path. Even a simple change to a relational table can lock rows, stall queries, or break dependent services if done without a plan.
Start with the database type. In PostgreSQL, ALTER TABLE ADD COLUMN is straightforward, but adding default values with NOT NULL on large tables can block writes. Instead, add the column as nullable, backfill in controlled batches, then set constraints when safe. MySQL and MariaDB can fail over instantly with ALGORITHM=INPLACE in some cases, but version-specific behavior matters. Test against a replica before running in production.
For distributed databases, schema changes may need coordination across nodes. Systems like CockroachDB or Spanner manage schema changes automatically, but load can spike during propagation. Monitor cluster health metrics and throttle changes if needed.