Adding a new column to a table is straightforward, but scale changes everything. A small SQLite table adds instantly. A production-grade PostgreSQL or MySQL instance with millions of rows can lock, stall, or break workloads. The “simple” task becomes a migration strategy you need to get right the first time.
Plan the structure. Decide the data type, nullability, default values, and indexing before touching the schema. Adding a column without defaults means every insert must carry the new field; adding defaults on a huge table may trigger costly rewrites.
Choose the right migration path. In PostgreSQL, ALTER TABLE ADD COLUMN runs fast if no default is set; adding a default forces a table rewrite. In MySQL, adding a column can be online with certain storage engines, but metadata locks can still hit queries. For high-traffic systems, use phased migrations: