Rails migration files generate into corresponding modular directories

In a Ruby on Rails project, all migration files generate into the same
directory ‘db/migrate’. It’s enough for simple projects, but not
that good for large modulized projects. It is inconvenient to review
thousands of files in the same directory for one project.

It looks like:

Since MVC directories are modular, the migration directory should the
same. It’s expected to be structured and clear. That’s the reason I
release the gem modular_migration.

Just include it in your Gemfile:

gem ‘modular_migration’

Using Rails generator as usual:

$ rails generate model Core::User name:string
invoke active_record
create app/models/core/user.rb
create app/models/core.rb
create db/migrate/core/user/20140324105328_create_core_users.rb

It will look like:

Source code and issue tracking:
https://github.com/swordray/modular_migration

Welcome to star, fork and pull request at GitHub.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs