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

NoMethodError: undefined method `add_column_for_on_duplicate_key_update' #3

Open
sachinswagh opened this issue Apr 15, 2021 · 3 comments

Comments

@sachinswagh
Copy link

Versions:
activerecord-import: 1.0.4
activerecord-import-oracle_enhanced: 0.1.5

User.import([User.new])
  (128.0ms) [SELECT column_name AS name, data_type AS sql_type, data_default, nullable, virtual_column, hidden_column, data_type_owner AS sql_type_owner, DECODE(data_type, 'NUMBER', data_precision, 'FLOAT', data_precision, 'VARCHAR2', DECODE(char_used, 'C', char_length, data_length), 'RAW', DECODE(char_used, 'C', char_length, data_length), 'CHAR', DECODE(char_used, 'C', char_length, data_length), NULL) AS limit, DECODE(data_type, 'NUMBER', data_scale, NULL) AS scale FROM all_tab_cols WHERE owner = 'RAILS4TESTORACLE1' AND table_name = 'USER_GROUPS' AND hidden_column = 'NO' ORDER BY column_id
  
   Group Load (20.0ms) [0m  SELECT "GROUPS".* FROM "GROUPS" WHERE "GROUPS"."ROOT" = 1
  
NoMethodError: undefined method `add_column_for_on_duplicate_key_update' for #<ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter:0x5b6e0226>
from C:/dev/workspace/3RPM/local-third-party/jruby-dist-9.1.17.0-bin/jruby-9.1.17.0/lib/ruby/gems/shared/gems/activerecord-import-1.0.4/lib/activerecord-import/import.rb:1003:in `block in add_special_rails_stamps'

Observation:
There is breaking change since activerecord-import 1.0.0
https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md#changes-in-100

@sachinswagh
Copy link
Author

@keeguon: any update?

@keeguon
Copy link
Owner

keeguon commented Apr 17, 2021

@sachinswagh Built a VM today after your message on LinkedIn and I had some other stuff to test regarding Oracle on Java, currently working on a fix, will be ready tomorrow night or at the latest on Monday ;)!

@sachinswagh
Copy link
Author

Thank you @keeguon, We are in the process of upgrading our tech stack from Rails 3 to Rails 4 and we stuck on issue related to bulk import using Oracle and SQL server. Same issue is with activerecord-import-sqlserver (keeguon/activerecord-import-sqlserver#6)

It will be very helpful if these can be fixed.

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

2 participants