Adding a new column is one of the most common schema changes in any production database. It can be simple in theory, but the wrong approach can lock tables, slow queries, or even bring critical systems down. Precision matters. Downtime is expensive.
A new column changes how your data is stored, indexed, and queried. Before you alter a table, decide whether the column should be nullable, have a default value, or be populated through backfill. Measure the impact of each choice. Adding a column with a default on a large table can cause a full rewrite, blocking reads and writes. On high-traffic systems, use migrations that run in phases—first adding the column as nullable, then backfilling in controlled batches, and finally setting constraints.
In PostgreSQL, an ALTER TABLE ADD COLUMN with no default is fast. Set defaults later in a separate update step. In MySQL, schema changes may require tools like pt-online-schema-change or gh-ost to avoid service interruptions. Even with modern managed databases, understand how your provider executes schema changes under the hood.