Skip to content

Commit

Permalink
DEV-7136 #time 5m Explicitly handle 'smallint' and 'bigint' sql types…
Browse files Browse the repository at this point in the history
…, to prevent a limit clause being added.
  • Loading branch information
Victor Miao committed May 10, 2021
1 parent 8d4e1d1 commit bcf3235
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ def index_name_length
# Maps logical Rails types to PostgreSQL-specific data types.
def type_to_sql(type, limit: nil, precision: nil, scale: nil, **)
case type.to_s
when 'smallint'
return 'smallint'
when 'bigint'
return 'bigint'
when 'integer', 'int'
return 'integer' unless limit

Expand Down

0 comments on commit bcf3235

Please sign in to comment.