Migration Manager is a Ruby on Rails gem that provides a web interface for managing database migrations. It allows you to view migration statuses, run pending migrations, create new tables with multiple columns, and update existing tables by adding new columns.
Add this line to your application's Gemfile:
gem 'migration-manager'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install migration-manager
To use this gem, you must remove or disable the following configuration in your environment files (development, production, or test):
config.active_record.migration_error = :page_load # Remove or set to false
Set up authentication by defining the following environment variables:
export MIGRATION_MANAGER_USER=admin
export MIGRATION_MANAGER_PASSWORD=password
These credentials will be required to access the Migration Manager interface securely.
To mount the Migration Manager in your Rails application, add this line to your config/routes.rb
file:
mount MigrationManager::Engine, at: "/migration_manager"
For now, you must also explicitly require the gem in your application:
require 'migration_manager'
Visit with this url base_url/migration_manager/home
✅ We are working on making this requirement unnecessary in future versions.
- ✅ View all migration statuses – See pending and applied migrations.
- ✅ Run pending migrations – Apply database changes directly from the interface.
- ✅ Create tables with multiple columns – Generate new tables with configurable columns.
- ✅ Update existing tables – Add new columns to existing tables with ease.
- ✅ Secure access – Authentication required via environment variables.
When deploying to production or staging, migrations must be manually run on the deployment server console. Alternatively, you can set up a trigger on the server to automate migration execution.
Bug reports and pull requests are welcome on GitHub at Migration Manager Repository. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Migration::Manager project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the code of conduct.