Thanks to visit codestin.com
Credit goes to www.ruby-toolbox.com

0.0
The project is in a healthy, maintained state
slash_migrate is a mountable, development-only Rails engine. Mount it and visit /rails/migrate to generate models and migrations, design indexes and defaults, and modify existing tables through a GUI that always shows the migration code it will write.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 8.0
 Project Readme

slash_migrate

A development-only Rails engine that gives you a GUI for everyday database migrations. Mount it, visit /rails/migrate, and create models, design columns and indexes, and modify existing tables — while it shows you the exact migration code it will write, so you pick up the commands as you go.

It's built for people still getting comfortable with Active Record migrations.

Development only. slash_migrate writes real files to db/migrate and app/models and runs real migrations against your database. It mounts in your development environment only (configurable) and should never be loaded in production.

Installation

Add it to the development group of your Gemfile:

group :development do
  gem "slash_migrate"
end

Then install:

bundle install

There's no routes.rb change to make — the engine mounts itself at /rails/migrate in development. Start your server and visit http://localhost:3000/rails/migrate.

What you can do

  • Browse your tables, columns, indexes, and foreign keys.
  • Create a model and its migration, with column types, null / default, indexes (including unique), and references / foreign keys.
  • Add, edit, or drop columns on an existing table.
  • Add or drop indexes.
  • Run, roll back, or delete pending migrations.

Every screen previews the migration (and model) code it will generate before you commit to it.

Configuration

The defaults suit most apps. To change them, add an initializer:

# config/initializers/slash_migrate.rb
SlashMigrate.configure do |config|
  config.mount_path = "/rails/migrate"          # where the engine mounts
  config.enabled_environments = ["development"]  # environments it runs in
end

The engine mounts itself when routes are drawn, which happens after your initializers run — so overriding these values here takes effect.

Requirements

  • Ruby >= 3.4
  • Rails >= 8.1.3

Contributing

Bug reports and pull requests are welcome at https://github.com/firstdraft/slash_migrate.

License

Released under the MIT License.