Skip to content

Commit

Permalink
Fix limit on int8 columns (pennylane-hq#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonid-shevtsov authored Oct 6, 2023
1 parent 8051862 commit 1a88a55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/active_record/connection_adapters/redshift_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ def translate_exception(exception, message:, sql:, binds:)

class << self
def initialize_type_map(m) # :nodoc:
register_class_with_limit m, 'int2', Type::Integer
register_class_with_limit m, 'int4', Type::Integer
register_class_with_limit m, 'int8', Type::Integer
m.register_type 'int2', Type::Integer.new(limit: 2)
m.register_type 'int4', Type::Integer.new(limit: 4)
m.register_type 'int8', Type::Integer.new(limit: 8)
m.alias_type 'oid', 'int2'
m.register_type 'float4', Type::Float.new
m.alias_type 'float8', 'float4'
Expand Down

0 comments on commit 1a88a55

Please sign in to comment.