Open Naren1997 opened 1 month ago
the db2 package has this same pattern as rails have, thus ending up overloading the rails one (though db2 connection is not used)
module ActiveRecord
module ConnectionAdapters
module Savepoints
def create_savepoint(name = current_savepoint_name)
end
end
end
end
Hello Team,
We have two DB connections in our project, one is for storing data in our Postgres DB, another connection is for IBM DB2, which has the actual data in it, we get the data from DB2 and puts in our Postgres DB. With Postgres adaptor connection, when we have the code that calls the 'create_savepoint' method, instead of calling the code for Postgres adaptor its going to IBM DB adaptor's, I'm getting error undefined method puts_log for Postgres adaptor. It looks the issue is with https://github.com/ibmdb/ruby-ibmdb/blob/master/IBM_DB_Adapter/ibm_db/lib/active_record/connection_adapters/ibm_db_adapter.rb#L502 code such that it'll override the actual https://github.com/rails/rails/blob/main/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb#L6
environment usage ruby 3.1.2 rails 7.0.8 postgres14.3 pg gem version 1.5.5 ibm_db gem version 5.4.1
database.yml default: &default primary: adapter: postgresql schema_search_path: 'blueid' db2_source: database_tasks: false adapter: ibm_db schema: blueid encoding: utf8