Adding a new column sounds simple. In production databases, it is not. Schema changes can block traffic, lock rows, and cause downtime. The right approach depends on scale, database engine, and workload.
In PostgreSQL, ALTER TABLE ADD COLUMN is straightforward for nullable or default-null fields. It runs fast because the command updates metadata, not every row. But adding a column with a default value on large tables can rewrite all rows, leading to long locks. In MySQL, the impact can be worse if your engine does not support instant ADD COLUMN. Always check the execution plan before running migrations.
For online systems, use tools like pg_online_schema_change or pt-online-schema-change. They add a new column by creating a shadow table, syncing changes, and swapping it in with minimal lock time. This keeps the application responsive while the database structure evolves.