Adding a new column to a database should be simple. In practice, it often threatens uptime, performance, and deployment pipelines. The risk grows with table size, concurrent writes, and strict SLAs. The wrong migration locks tables, blocks queries, and forces rollbacks. The right approach ships cleanly, without a ripple for users.
A new column in SQL is created with ALTER TABLE. The syntax is short, but the execution path matters. In PostgreSQL, small ALTER TABLE ADD COLUMN operations can be instant for nullable fields with defaults of NULL. In MySQL, the same change can trigger a full table rebuild, depending on the storage engine and version. On large datasets, that can mean hours of downtime unless you use an online schema change tool such as gh-ost or pt-online-schema-change.
Best practice when adding a new column is to design for backward compatibility. Deploy the column first, with NULL allowed and no default. Update application code to write to it. Backfill data in small batches to avoid overwhelming I/O. Only after backfill and verification should constraints or indexes be added.