Adding a new column sounds simple. Done wrong, it can lock your database, stall queries, and push latency through the roof. The right approach is zero-downtime migration.
Start by defining the new column in a way that does not rewrite the whole table. In PostgreSQL, adding a nullable column without a default is instant. In MySQL, use ALTER TABLE with care—prefer adding columns that avoid full table copies. Avoid big default values until after the column exists.
Use feature flags to control when the application starts writing to the column. This ensures that older code paths remain valid during rollout. Backfill data in small batches to avoid long-running transactions. Monitor query plans; indexes on the new column can change execution paths.