Adding a new column is one of the most common schema changes in any production database. It looks simple. It isn’t. In production environments, the wrong approach can lock tables, stall queries, or crash dependencies. The key is precision and zero downtime.
Before you add the column, decide its type, nullability, and default. Every choice has costs. A nullable column is quick to deploy but may require repeated null checks in application code. A column with a default can backfill faster, but large tables make this risky. Watch for full table rewrites in MySQL or Postgres.
For relational databases, use an ALTER TABLE statement with caution. PostgreSQL can add a nullable column instantly, but adding a non-null column with a default rewrites every row. In MySQL, even metadata-only changes can depend on the storage engine. For high-traffic services, wrap changes in a migration system that runs safely during peak load.