Adding a new column seems simple until it isn’t. In production, schema changes can slow queries, lock tables, or take services offline. The right approach depends on scale, database type, and deployment rules.
First, define the column precisely. Choose the smallest data type that can hold your values. Match nullability to the actual data model. Avoid using default values unless absolutely necessary—they can trigger a full table rewrite on some systems.
Second, decide between an online and offline migration. In smaller datasets, ALTER TABLE ADD COLUMN is fine. For large tables, online migrations prevent downtime. Postgres users can add a nullable column instantly, but non-null with default requires careful batching. MySQL with InnoDB may rebuild the table, so test the operation on a copy first.