Adding a new column should be simple. In practice, the speed and safety of the change depend on how you design, deploy, and backfill it. A careless change can lock tables, block transactions, and trigger downtime. The right approach turns it into a zero-downtime, low-risk operation.
First, define the new column in your schema with explicit types, defaults, and nullability. Avoid vague types; pick the smallest one that works for your data. If the column will be queried often, plan indexes now, but create them separately from the initial deployment to reduce locking.
Run the schema change in a controlled migration script. For large tables, add the column without writing defaults to every row immediately. This prevents full table rewrites. Backfill in batches, using queues or scheduled jobs, monitoring slow queries and lock waits as you go.