TalentBox / sequel-rails

A gem for using Sequel with Rails 5.x, 6.x, 7.x, 8.x
http://talentbox.github.io/sequel-rails/
MIT License
326 stars 81 forks source link

sequel-rails does not detect migrations from other specified directories. #129

Open Aryk opened 7 years ago

Aryk commented 7 years ago

In Rails (atleast in 4 and 5), you can specify multiple paths for db/migrate, for example if you have Rails engines:

https://content.pivotal.io/blog/leave-your-migrations-in-your-rails-engines

The Sequel::Migrator class does not work with multiple directories and would take significant refactoring (not sure if Jeremy, the maintainer of Sequel, wants to do that, so I did a relatively simple solution.

My suggestion to resolve this is to copy the files temporarily over to the db migrate directory and then delete them after the SequelRails::Migrations call is over.