Adding a new column in a database looks simple. In practice, it can be the difference between a clean system and one that slows under its own weight. You can change the schema with a single command, but the real skill is doing it without downtime, without risk, and without introducing logic drift.
The most common path is ALTER TABLE ADD COLUMN. The command syncs the column into the existing structure. In transactional systems, this is fast because empty columns default to NULL and don’t rewrite every row. But once you set NOT NULL constraints or default values, the engine may rewrite data. On large tables, this can lock writes or even block reads.
The smarter approach is to add the column, allow NULL, backfill data in controlled batches, then apply constraints after the data is in place. Use transactional migrations where possible, but in massive datasets, break migrations into phases to avoid full table locks. Monitor write latency during backfill.