The fix was simple: add a new column. The impact was immediate.
Adding a new column should be fast, safe, and reversible. In relational databases like PostgreSQL or MySQL, the ALTER TABLE command is the entry point. For example:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This creates the column without rewriting the entire table in most modern engines, but the details vary. On large tables, schema changes can lock writes or cause outages if not planned. Systems like PostgreSQL handle many ADD COLUMN operations efficiently when defaults are null, but they can still trigger a table rewrite if you set a default with a non-null constant.
Migrations are the safest way to manage schema changes. Tools like Flyway, Liquibase, and Alembic track these updates in version control. Deploying a new column should be staged: first add it, then backfill data in batches, then enforce constraints. This avoids downtime and reduces replication lag.