Adding a new column sounds simple. It rarely is. Every database change risks data integrity, downtime, and performance hits. A careless ALTER TABLE can lock rows, block writes, or crash a critical path in production.
The work starts with the schema. Decide the column name, data type, nullability, default values. For high-traffic systems, plan the change to avoid full table rewrites. In PostgreSQL, adding a nullable column with no default is almost instant. Adding a non-null column with a default will rewrite the entire table—dangerous without maintenance windows.
Migrations must be atomic, reversible, and tested. Use feature flags to decouple schema changes from code changes. Deploy the schema first, then update the application to write and read from the new column only when ready. For wide tables or massive datasets, consider online schema change tools like gh-ost or pt-online-schema-change to avoid downtime.