ilyakatz / data-migrate

Migrate and update data alongside your database structure.
MIT License
1.4k stars 192 forks source link

Fix status_with_schema with multiple migrations path (Engine) #291

Closed andrewjstrominger closed 3 weeks ago

andrewjstrominger commented 11 months ago

The Dir.foreach(File.join(Rails.root, migrations_paths)) just doesn't handle multiple data migrations paths. So I took a shot at fixing it.

anoam commented 10 months ago

Hey @andrewjstrominger Good job! I was investigating the same and then found your PR. Thank you.

The only thing I'm still concerned about is DataMigrate::DataMigrator.migrations_paths. I didn't manage to find a particular issue with that. But I'm suspecting it should be replaced with the following code as well.

def self.migrations_paths
  Array(DataMigrate.config.data_migrations_path)
end

This might be irrelevant for you PR though.