Adding a new column in production is never trivial. Schema changes touch the core of your system. Done wrong, they lock queries, drop indexes, or freeze writes. Done right, they add capability without slowing a single request.
The safest way to add a new column starts with a migration plan. First, assess the table size and index load. On large datasets, schema changes should be online and non-blocking. Tools like ALTER TABLE ... ADD COLUMN may still lock work in older engines, so test on staging with production-scale data.
Choose default values or NULL carefully. A default with NOT NULL will rewrite the table. This can trigger downtime. Consider adding the new column as NULL, backfilling in controlled batches, and applying constraints last.
If your queries depend on the new column immediately, deploy application code in two steps. First, add the column without touching existing paths. Second, release the code that reads and writes it. This avoids race conditions and ensures rollbacks stay clean.