Adding a new column sounds trivial. It isn’t. If you move fast and ship often, schema changes are landmines. Block a query for seconds in production and you could stall a live system. Lose data in a migration and you’re in incident territory.
The right approach starts with clarity. Define the column name, type, constraints, and defaults. Decide if it should allow nulls. If your database supports it, add the column as a metadata change first. This avoids full table rewrites.
For PostgreSQL, ALTER TABLE ... ADD COLUMN with a default can lock the table. Instead, add the column without a default, backfill it in small batches, then set the default and add constraints. In MySQL, ensure the operation is online or run it during low traffic. For distributed systems like CockroachDB, test schema changes in staging under realistic load.