A migration runs. You need a new column.
Adding a new column is simple in theory, but the smallest detail can break production if you get it wrong. You must choose the right data type, set defaults, decide on nullability, and plan the indexing. For high-traffic systems, you also need to think about locking, query performance, and the impact on replication lag.
In SQL, the syntax is straightforward:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP DEFAULT NOW();
But this is not where it ends. In practice, adding a new column in a live environment means coordinating deploys, migrations, and application code changes. If your ORM caches schema metadata, you may need an explicit refresh. Large tables introduce risk; an ALTER TABLE may lock writes for too long. Some engines allow online DDL to avoid downtime, but the process still needs validation and rollback plans.