Adding a new column should be fast, safe, and reversible. In practice, it often risks downtime, data corruption, or complex migrations. Large datasets make schema changes dangerous. Even small mistakes can break the system in production.
A new column in a relational database is not just another field. It is a schema change that must be coordinated with application code, deployment pipelines, and data integrity rules. Engineers choose between blocking migrations, online schema changes, or phased rollouts. Each option has trade-offs:
Blocking migrations
Simple to execute but locks the table while altering it. This can freeze writes and throw errors under load.
Online schema changes
Use background processes to copy and alter data without blocking. Tools like pt-online-schema-change or gh-ost handle this in MySQL. PostgreSQL supports adding nullable columns instantly, but adding defaults or constraints can still lock.