Adding a new column should be simple, but in production environments every schema change has cost. A missing index can slow queries to a crawl. An incorrect default can break inserts. Choosing the right approach to add a new column matters.
In SQL, adding a column is often done with ALTER TABLE. This works for small datasets, but large tables can lock for seconds or minutes. To minimize downtime, use online schema changes when supported, such as ALTER TABLE … ALGORITHM=INPLACE in MySQL or ADD COLUMN … with LOCK=NONE where available.
Plan for nullability and defaults. A nullable new column allows fast updates without rewriting data. Once the column exists and is populated, constraints can be added in a later migration. Avoid setting a default that forces a full table rewrite unless necessary.
For PostgreSQL, adding a new column with a constant default before version 11 rewrote the whole table. From 11 onward, adding a column with a non-null default is metadata-only for certain data types. This reduces the risk of blocking concurrent queries.