Latest: v0.1.0 - Rails Migration Guard with recovery tools

Keep Your Rails Migrations in Sync

Intelligent migration tracking that prevents orphaned migrations, reduces team conflicts, and keeps your database schema organized.

rails db:migration:status
$ rails db:migration:status
Migration Status Report
Current branch: feature/user-profiles → main branch
✓ Synced: 12 migrations
⚠ Orphaned: 2 migrations
✗ Missing: 0 migrations
Orphaned Migrations:
• 20240115123456_add_avatar_to_users.rb (feature/avatars, 3 days ago)
• 20240116789012_create_notifications.rb (feature/notifications, 1 day ago)
💡 Run `rails db:migration:rollback_orphaned` to clean up

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.

1

Add to your Gemfile

# Gemfile
group :development, :staging do
  gem 'rails_migration_guard'
end
2

Install and generate

$ bundle install
$ rails generate migration_guard:install
$ rails db:migrate
3

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!