Adding a new column sounds simple. In production, it can be dangerous. Schema changes can lock rows, block writes, or cause downtime if not handled with care. You have to choose the right migration strategy before touching anything.
First, decide the column type and whether it allows null values. Adding a nullable column is usually fast in most relational databases. Adding a non-nullable column with a default value can rewrite the entire table, which can be slow on large datasets.
Plan for zero-downtime changes. In PostgreSQL, use ADD COLUMN with NULL allowed, then backfill data in small batches to avoid heavy locks. Once the backfill is complete, and data is in place, set NOT NULL constraints. In MySQL, check the engine version and storage format—some operations are metadata-only and instant, others are blocking.