Adding a new column should be fast, safe, and predictable. In most databases, it can be. But in production systems, even a simple ALTER TABLE ADD COLUMN can cause locks, downtime, or schema drift. The key is understanding how your database engine handles schema changes, and planning for zero-impact deployment.
In PostgreSQL, adding a nullable column with a default is efficient in modern versions. The metadata changes instantly, and rows inherit the default without a rewrite. In MySQL, behavior depends on storage engine and version—older releases may rebuild the table, while newer ones use in-place algorithms. For high-traffic systems, always test the exact migration on a staging dataset that mirrors real size and indexes.
When introducing a new column, define its purpose and constraints early. Decide if it should allow nulls, what the default should be, and how it will be indexed. Avoid backfilling in the same migration if it can cause large transaction overhead. Instead, roll out the column first, then run background jobs to populate and index as needed.