The migration was done. The API calls returned clean. But the schema was missing one thing—your new column.
Adding a new column sounds simple. In practice, it can break production if you get it wrong. The wrong type. A null constraint missed. An index forgotten. That’s why controlled, reversible schema changes are critical.
Start by defining the exact name, type, and constraints for the new column. Use lower_snake_case naming to prevent conflicts. Avoid default values unless required by the application logic. Every default becomes a permanent contract in your data model.
In SQL, the basic form is:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP WITH TIME ZONE;
Run it in staging with realistic datasets. Check how it interacts with existing queries, especially those using SELECT *. Examine ORM migrations to ensure version control reflects the change. If your database is large, consider using ADD COLUMN without a default, backfilling in batches to avoid locks.