Adding a new column should be simple, but in production systems it can break queries, stall writes, and block deploys. The key is knowing how to create, backfill, and index it without downtime.
First, define your new column in a way that fits your schema and future queries. Choose the right data type—changing it later will cost more time and risk. Set NULL or a default value based on how existing data should behave.
Second, deploy schema changes in steps. Add the new column without constraints. Then backfill data in small batches to avoid locking tables or overwhelming the database. For high-traffic systems, run the backfill in background workers or during low usage windows.