Adding a new column is simple in concept but dangerous in production. It changes the schema. It can break code paths. It can slow queries. The right approach prevents downtime and data loss.
First, define the column name, type, and constraints. Every choice has consequences. VARCHAR length can affect index size. NULL vs NOT NULL changes how rows are stored and validated. Match the type to the data as tightly as possible.
Second, update your migration scripts. Use an explicit ALTER TABLE statement. In large tables, this can lock writes for minutes or hours. Where possible, run schema changes during maintenance windows or use online DDL features supported by your database.
Third, verify application code handles the new column. This includes ORM models, raw queries, and serialization layers. Adding a column without updating code can cause silent failures or corrupt data in downstream systems.