Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map :bigint as NUMBER(19) sql_type by using :limit => 19 for Oracle #20404

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def test_integer_types

def test_bigint_limit
cast_type = @connection.type_map.lookup("bigint")
assert_equal 8, cast_type.limit
if current_adapter?(:OracleAdapter)
assert_equal 19, cast_type.limit
else
assert_equal 8, cast_type.limit
end
end

def test_decimal_without_scale
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/migration/change_schema_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_create_table_with_bigint
eight = columns.detect { |c| c.name == "eight_int" }

if current_adapter?(:OracleAdapter)
assert_equal 'NUMBER(8)', eight.sql_type
assert_equal 'NUMBER(19)', eight.sql_type
elsif current_adapter?(:SQLite3Adapter)
assert_equal 'bigint', eight.sql_type
else
Expand Down