Adding a new column in a production database sounds simple. It rarely is. The operation touches schema, queries, indexes, and performance. If done wrong, it locks tables, breaks services, and creates downtime. If done right, it ships without users noticing anything happened.
A new column changes the shape of your data. First, define the column name and data type. Match the type to the data you will store—integer, text, timestamp, JSON. Avoid NULL defaults unless required. Decide how to populate existing rows. Use a default value or backfill in a controlled batch.
With large datasets, adding a new column can block writes. Use online schema changes if supported. In PostgreSQL, simple ALTER TABLE ADD COLUMN is fast when no DEFAULT is set. When a DEFAULT must be applied to existing rows, run an update in batches to prevent long transactions. In MySQL, use ALGORITHM=INPLACE or tools like pt-online-schema-change.