Adding a new column sounds simple, but in production systems it can break queries, corrupt data, or lock tables for hours. The safest approach is to design schema changes that deploy without downtime. This means planning the new column, backfilling data, and updating dependent code in stages.
Start by defining the column in your schema with the correct data type and nullability. Avoid defaults that trigger full table writes on large datasets. If you must backfill, batch the updates and monitor throughput to avoid overload. Use feature flags or conditional logic so old code and new code can run side-by-side during the migration window.
In MySQL, ALTER TABLE locks can cause latency spikes. In PostgreSQL, adding a column without a default is fast, but adding one with a non-null default rewrites the table. For distributed databases, schema changes can require coordination across shards or replicas.