Adding a new column is simple in theory, but dangerous in practice. A careless migration can lock tables, drop data, or slow queries to a crawl. The safest path starts with clear intent: define the column name, data type, default value, and nullability before touching anything. Document these choices. They will be code artifacts later.
For relational databases, use an explicit migration file. Tools like Flyway, Liquibase, or Rails migrations turn schema changes into versioned steps. This way, every environment—local, staging, production—moves forward together. Avoid implicit changes through ORM auto-sync; they can mutate live data without warning.
When adding a new column to a large table, consider concurrent operations. PostgreSQL’s ADD COLUMN is fast if you allow nulls, but slow if you set a default immediately. A two-step migration—first add the column null, then backfill, then set defaults—keeps downtime near zero.