Concept Flow - Running and rolling back migrations
Start: Migration files exist
Run migration command
Rails applies migrations in order
Database schema updated
If rollback needed?
No→End
Yes
Run rollback command
Rails reverts last migration
Database schema reverted
End
This flow shows how Rails applies migrations to update the database schema and how it can revert changes by rolling back the last migration.