Adding a new column is one of the most common schema changes. It should be simple, but it can also be dangerous if handled carelessly. Downtime, locking, failed migrations — all can hit at scale. The best process is deliberate, precise, and backed by automation.
First, define why the column exists. Never add a column without a clear purpose. Document its type, default value, and constraints. Decide if it allows nulls. Consider indexing only if queries will use it immediately; avoid unnecessary indexes during the first deployment.
Second, choose the safest migration pattern. Large tables require online schema changes to avoid long locks. Use tools like pt-online-schema-change or native database features that allow adding new columns without blocking reads and writes. In PostgreSQL, adding a nullable column without a default is almost instant. In MySQL or MariaDB, the same change may need a different approach.