Closed Dharshi closed 9 years ago
This isn't a ruby-oci8 issue.
Could you report the issue to oracle_enhanced instead of ruby-oci8?
IMO, the combination of rails 4.1.0 and oracle_enhanced 1.5.5 generates CREAE INDEX...
statement for add_index(...)
. But the combination of rails 4.2.3 and oracle_enhanced 1.6.0 uses ALTER TABLE ... ADD CONSTRAINT ...
for it.
I have done following updates
rails from 4.1.0 to 4.2.3 activerecord-oracle_enhanced-adapter from 1.5.5 to 1.6.0 ruby-oci8 from 2.1.7 to 2.1.8
when I run bundle exec rake db:schema:load
it results following error
add_index("users", ["LOWER(\"USER_ID\")"], {:name=>"index_users_on_lower_user_id", :unique=>true}) rake aborted! ActiveRecord::StatementInvalid: OCIError: ORA-00904: : invalid identifier: ALTER TABLE "USERS" ADD CONSTRAINT "INDEX_USERS_ON_LOWER_USER_ID" UNIQUE (LOWER("USER_ID")) stmt.c:250:in oci8lib_220.bundle
/Users/dharshi/.rvm/gems/ruby-2.2.1@iteach/gems/ruby-oci8-2.1.8/lib/oci8/cursor.rb:129:in `exec'