Adding a new column sounds simple. It can also be the trigger for a silent outage if you get it wrong. Schema changes in production must respect uptime, performance, and consistency. The wrong ALTER TABLE can lock writes or slow queries to a crawl.
First, define the purpose of the new column. Is it storing computed data, foreign keys, or a flag for feature control? Decide the data type with precision. Misjudged size or nullability can force future migrations that hurt even more.
Second, choose a safe migration path. For large tables in PostgreSQL or MySQL, avoid blocking DDL. Use online schema change tools like pt-online-schema-change or gh-ost. These allow you to add a new column without locking the table for writes.
Third, handle default values carefully. Setting a default on an existing table can rewrite all rows. This can be slow and hold locks. Instead, add the new column as nullable, backfill in batches, and then set the default in a later step.