The table was wrong. Data was missing, numbers were off, and the only fix was to add a new column.
A new column changes the shape of your database. It adds capacity, clarity, and sometimes speed. But it also shifts indexes, affects queries, and can break application code if not planned. The creation of a column in SQL, PostgreSQL, or MySQL is simple:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
The complexity comes after. Adding a new column triggers a schema migration. In production, that migration might lock the table, slow reads and writes, or block transactions. The table’s size, indexes, and constraints influence the impact. On large datasets, a casual ALTER TABLE can take minutes, sometimes hours. That is downtime you cannot afford.
For zero-downtime deployment, the new column must be introduced in stages. First, add it without constraints. Then backfill data in small batches. Finally, apply indexes or foreign keys. This prevents long lock times and keeps the database responsive. Many teams coordinate these steps with migrations tools like Flyway, Liquibase, or native Rails and Django migration systems.