Adding a new column seems simple. In SQL, you can run:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
In production, this is loaded with risk. On large datasets, ALTER TABLE can lock writes for seconds or hours. That means stalled requests, queue backups, or even downtime. For high-volume systems, this needs planning, isolation, and often a zero-downtime approach.
When you create a new column, decide whether it allows NULL, has a default, or needs backfilled data. Adding a non-nullable column with a default can rewrite the entire table. On Postgres, this may cause a full table rewrite unless the default is a constant and you use supported fast-path patterns. On MySQL, long-running schema changes often require tools like pt-online-schema-change or native ALTER TABLE ... ALGORITHM=INPLACE if available.
In distributed databases, a new column impacts schema serialization across services. You need to coordinate deployments so readers and writers handle the new field without breaking older code versions. With ORMs, ensure migrations run in lockstep with application releases, or decouple schema changes from code changes via feature flags.