mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert commit 4ec5b0d6b4
in favor of #28379
Commit4ec5b0d
was for fixing the regression #18787, but #28379 fixes #18787 as well. So4ec5b0d
is no longer necessary.
This commit is contained in:
parent
1e51a38fbc
commit
4f8d702413
2 changed files with 4 additions and 9 deletions
|
@ -537,12 +537,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def extract_limit(sql_type)
|
||||
case sql_type
|
||||
when /^bigint/i
|
||||
8
|
||||
when /\((.*)\)/
|
||||
$1.to_i
|
||||
end
|
||||
$1.to_i if sql_type =~ /\((.*)\)/
|
||||
end
|
||||
|
||||
def translate_exception_class(e, sql)
|
||||
|
|
|
@ -82,11 +82,11 @@ unless current_adapter?(:PostgreSQLAdapter) # PostgreSQL does not use type strin
|
|||
end
|
||||
|
||||
def test_bigint_limit
|
||||
cast_type = @connection.send(:type_map).lookup("bigint")
|
||||
limit = @connection.send(:type_map).lookup("bigint").send(:_limit)
|
||||
if current_adapter?(:OracleAdapter)
|
||||
assert_equal 19, cast_type.limit
|
||||
assert_equal 19, limit
|
||||
else
|
||||
assert_equal 8, cast_type.limit
|
||||
assert_equal 8, limit
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue