activerecord-clean-db-structure icon indicating copy to clipboard operation
activerecord-clean-db-structure copied to clipboard

Support for migrations_paths

Open hlascelles opened this issue 7 months ago • 2 comments

We are using Rails' feature migrations_paths.

However activerecord-clean-db-structure errors with:

Errno::ENOENT: No such file or directory @ rb_sysopen - db/secondary_structure.sql (Errno::ENOENT)
..../gems/activerecord-clean-db-structure-0.4.3/lib/activerecord-clean-db-structure/tasks/clean_db_structure.rake:28:in `read'
..../gems/activerecord-clean-db-structure-0.4.3/lib/activerecord-clean-db-structure/tasks/clean_db_structure.rake:28:in `block (2 levels) in <main>'
..../gems/activerecord-clean-db-structure-0.4.3/lib/activerecord-clean-db-structure/tasks/clean_db_structure.rake:26:in `each'
..../gems/activerecord-clean-db-structure-0.4.3/lib/activerecord-clean-db-structure/tasks/clean_db_structure.rake:26:in `block in <main>'
..../gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'

The structure is actually found at: db_other/secondary_structure.sql if the config is:

  secondary:
    adapter: ...
    migrations_paths:
      - "db_other/migrate"

Would you accept a PR to handle migrations_paths?

hlascelles avatar Mar 28 '25 15:03 hlascelles