use regular expression or statement. loltargetrichenvironment
This commit is contained in:
parent
071c8bf62a
commit
8e051a180e
@ -112,7 +112,7 @@ def table(table, stream)
|
||||
|
||||
# AR has an optimization which handles zero-scale decimals as integers. This
|
||||
# code ensures that the dumper still dumps the column as a decimal.
|
||||
spec[:type] = if column.type == :integer && [/^numeric/, /^decimal/].any? { |e| e.match(column.sql_type) }
|
||||
spec[:type] = if column.type == :integer && /^(numeric|decimal)/ =~ column.sql_type
|
||||
'decimal'
|
||||
else
|
||||
column.type.to_s
|
||||
|
Loading…
Reference in New Issue
Block a user