Keep Your Rails Migrations in Sync
Intelligent migration tracking that prevents orphaned migrations, reduces team conflicts, and keeps your database schema organized.
Built for Modern Rails Teams
Stop worrying about migration conflicts and orphaned schemas. Rails Migration Guard automatically tracks and manages your database migrations across branches.
Automatic Tracking
Seamlessly tracks every migration as it runs, capturing branch, author, and timestamp metadata. Works with your existing Rails workflow without any changes.
Smart Detection
Instantly identifies orphaned migrations that exist locally but not in your main branch. Prevents deployment issues before they reach staging or production.
Easy Cleanup
One-command rollback for orphaned migrations with interactive prompts and safety checks. Protects your data while keeping your schema clean.
Recovery Tools
Powerful recovery system fixes inconsistent migration states automatically. Handles stuck rollbacks, missing files, and duplicate records with database backups.
Migration History
Complete audit trail of all migration executions with author tracking. Filter by branch, date, or developer to understand your migration timeline.
Rails 8.0 Ready
Fully compatible with Rails 6.1 through 8.0. Tested across all major Ruby versions and databases including PostgreSQL, MySQL, and SQLite.
Get Started in Minutes
Add Rails Migration Guard to your project with a few simple commands.
Add to your Gemfile
# Gemfile
group :development, :staging do
gem 'rails_migration_guard'
end
Install and generate
$ bundle install
$ rails generate migration_guard:install
$ rails db:migrate
Check your migration status
$ rails db:migration:status
$ rails db:migration:doctor # Run diagnostics
Join the Community
Rails Migration Guard is open source and actively maintained. Contribute, report issues, or just star us on GitHub!