Adding a new column sounds trivial. In practice, it can stall deploys, lock tables, and cause downtime if done wrong. Schema changes demand precision. The database must accept writes during the change, queries must not break, and production traffic cannot be blocked. A single misstep in adding a new column can cascade into outages.
The first rule: never block the main table. Use ALTER TABLE with caution, and test on a staging clone with realistic data volume. For large datasets, online schema change tools keep tables available while creating the new column. Techniques like pt-online-schema-change or native ALTER TABLE ... ALGORITHM=INPLACE can prevent full locks.
Next, handle defaults and nullability. Making a new column NOT NULL with no default will fail if existing rows lack a value. Set sensible defaults, or backfill the column in batches before adding constraints. Avoid heavy writes in a single transaction — it will slow or crash production systems.