This PR adds the ability for multiple data_migration_paths to be set. This is useful for Rails applications leveraging
tools like Packwerk / Packs to split up their codebase into multiple packages.
Multiple paths can be specified in the data_migration_paths configuration option, however the default of one path is
still valid.
# config/initializers/data_migrate.rb
DataMigrate.configure do |config|
config.data_migrations_path = ['db/data/'] + Dir['packs/**/db/data']
end
The first path in the array is the default path which is used when generating new data migration files.
Much of this code was borrowed from #244, but I had to make some changes to get it working with the latest version.
This PR adds the ability for multiple
data_migration_paths
to be set. This is useful for Rails applications leveraging tools like Packwerk / Packs to split up their codebase into multiple packages.Multiple paths can be specified in the
data_migration_paths
configuration option, however the default of one path is still valid.The first path in the array is the default path which is used when generating new data migration files.
Much of this code was borrowed from #244, but I had to make some changes to get it working with the latest version.