Ticket #5489: change_pg_limit_translation.diff
| File change_pg_limit_translation.diff, 0.7 kB (added by pedrobelo@gmail.com <pedrobelo@gmail.com>, 4 years ago) |
|---|
-
lib/active_record/connection_adapters/postgresql_adapter.rb
old new 355 355 356 356 def type_to_sql(type, limit = nil) #:nodoc: 357 357 return super unless type.to_s == 'integer' 358 359 if limit.nil? || limit == 4 360 'integer' 361 elsif limit < 4 362 'smallint' 363 else 364 'bigint' 358 case limit 359 when 1..2: 'smallint' 360 when 3..4, nil: 'integer' 361 when 5..8: 'bigint' 365 362 end 366 363 end 367 364