cdinger / scenic-oracle_adapter

An Oracle adapter for Thoughtbot's scenic gem
MIT License
6 stars 5 forks source link

Load OracleEnhancedSchemaDumper if defined #11

Closed Quintasan closed 2 years ago

Quintasan commented 2 years ago

Older versions of activerecord-oracle_enhanced-adapter don't have ActiveRecord::ConnectionAdapters::OracleEnhanced::SchemaDumper module but have a ActiveRecord::ConnectionAdapters::OracleEnhancedSchemaDumper instead.

Quintasan commented 2 years ago

I found it was renamed in https://github.com/rsim/oracle-enhanced/commit/5e5368cf67173ed9451ca99d7196d2b5027a876f#diff-39517e2d830d5fd22570755b79e0eaeff8a05f8ebb6ed2e2e3e60b17fc4d3f5d but functionally wise I found no errors. I'm trying to run the test suite but nothing happened for the past 10 minutes :(

Quintasan commented 2 years ago

@cdinger LMK if you can take a look at that soon-ish since I need that change for my project. Otherwise I'll monkey-patch it and we can work on this later

cdinger commented 2 years ago

Thanks for the PR, @Quintasan. I'll take a look at this today.

Which version of Rails and activerecord-oracle_enhanced-adapter are you using this with?

Quintasan commented 2 years ago

@cdinger Oh boy, that's a question I really wish I had a different answer to but here goes:

Rails v4.2.11.3 activerecord-oracle_enhanced-adapter 1.6.9

I really wish I could upgrade to latest Ruby and Rails but I already spent weeks migrating from Ruby 2.0.

cdinger commented 2 years ago

It'd be nice if this inspected ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter::VERSION for see if the it's less than 1.7.0.beta1 but I think your solution is just fine. The version parsing could get more complicated than this is worth.

I'll merge this and release version 1.1.1. Thanks for your contribution!

cdinger commented 2 years ago

@Quintasan 1.1.1 has been published to rubygems. Thanks again!