Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

status_with_schema doesn't work with multiple migration_paths #292

Open
andrewjstrominger opened this issue Oct 20, 2023 · 0 comments
Open

Comments

@andrewjstrominger
Copy link

andrewjstrominger commented Oct 20, 2023

I recently found that status_with_schema doesn't work when following the Engine directions to add another migration path.

This doesn't work:

Dir.foreach(File.join(Rails.root, migrations_paths))
Errno::ENOENT: No such file or directory @ dir_initialize - HIDDEN
<internal:dir>:98:in `open'
/Users/andy.strominger/.rvm/gems/ruby-3.2.2@rotom/gems/data_migrate-9.0.0/lib/data_migrate/tasks/data_migrate_tasks.rb:70:in `foreach'

I put up a PR to fix it: #291
The PR changes it to:

Array(migrations_paths).map do |path|
  Dir.children(path) if Dir.exist?(path)
end.flatten.compact.each do |file|

(Copy/paste from right below it).

@andrewjstrominger andrewjstrominger changed the title status_with_schema doesn't work with multiple migration_path (found by using the engine directions) status_with_schema doesn't work with multiple migration_paths (found by using the engine directions) Oct 20, 2023
@andrewjstrominger andrewjstrominger changed the title status_with_schema doesn't work with multiple migration_paths (found by using the engine directions) status_with_schema doesn't work with multiple migration_paths Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant