Adding a new column is one of the most common changes in database work. Done right, it is safe, fast, and predictable. Done wrong, it can break production, lock tables, or cause weeks of backfill pain. The process depends on the database type and the requirements for downtime, indexing, and defaults.
In PostgreSQL, ALTER TABLE table_name ADD COLUMN column_name data_type; is the simplest path. If the new column has a default, avoid setting it in the same statement for large tables. This prevents a full table rewrite. Instead, create the column with NULL values, then update in batches. Once populated, add the DEFAULT and NOT NULL constraints.
In MySQL, online DDL can allow adding a new column without blocking reads and writes, depending on the storage engine and version. Use ALTER TABLE ... ALGORITHM=INPLACE, LOCK=NONE when possible. For massive datasets, consider adding the new column to a shadow table, syncing changes, and swapping tables in a controlled cutover.