Open jva opened 1 month ago
I was able to fix it with this code in /lib/active_record/connection_adapters/oracle_enhanced/schema_definitions.rb
module ActiveRecord
module ConnectionAdapters
module OracleEnhanced
module ColumnMethods
def primary_key(name, type = :primary_key, **options)
# This is a placeholder for future :auto_increment support
if type.is_a?(Hash)
options = type
type = :primary_key
end
super
end
Steps to reproduce
I can't get the standalone tests running on ARM64. But here is the code that reproduces it in my schema.rb:
create_table "account_users", id: { limit: 19, precision: 19 }, force: :cascade do |t| t.integer "account_id", limit: 19, precision: 19, null: false ...
Expected behavior
rails db:test:prepare
command should execute and create table with large number primary keyActual behavior
System configuration
Rails version: gem 'rails', '6.1.7.7'
Oracle enhanced adapter version: activerecord-oracle_enhanced-adapter (6.1.6)
Ruby version: jruby 9.3.13.0 (2.6.8) 2023-11-02 09b6f2263a OpenJDK 64-Bit Server VM 11.0.19+7 on 11.0.19+7 [arm64-darwin]
Oracle Database version: Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production