Adding a new column should be simple. In SQL, the ALTER TABLE command defines the change. You pick the name, the data type, and whether it can be null. But in production, the cost of that change depends on your database engine, table size, and traffic.
In MySQL, older versions lock the table during ALTER TABLE ADD COLUMN, blocking reads and writes until the change finishes. On large datasets, that downtime can cripple systems. PostgreSQL handles many column adds faster—especially if the column has no default value—because it only updates the metadata and avoids rewriting the entire table. But adding a column with a non-null default still rewrites data and takes time proportional to the table size.
Schema evolution strategies can reduce the pain of adding new columns. One approach is to add the column as nullable first. Then backfill values in batches, avoiding long locks. Later, set the column to NOT NULL once every row is populated. Another method uses feature flags at the application layer to control when a new column becomes active.