aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-06-01 11:57:54 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-06-01 11:57:54 -0300
commit1bfa81bd6edc3566fdc0d64d249c3a878cba5199 (patch)
tree2382439755289b66fa62599e31f687cbadfa0ebb
parent57e19e91cee532fbc4fb7ca72470d58f1b40afd5 (diff)
parenta9e6e6e07aa5f433e0f66179b22c1c9575685727 (diff)
downloadrails-1bfa81bd6edc3566fdc0d64d249c3a878cba5199.tar.gz
rails-1bfa81bd6edc3566fdc0d64d249c3a878cba5199.tar.bz2
rails-1bfa81bd6edc3566fdc0d64d249c3a878cba5199.zip
Merge pull request #20401 from yahonda/master_bigint_as_limit_19_in_oracle
Map :bigint as NUMBER(19) sql_type by using `:limit => 19` for Oracle
-rw-r--r--activerecord/test/cases/connection_adapters/type_lookup_test.rb6
-rw-r--r--activerecord/test/cases/migration/change_schema_test.rb2
2 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/test/cases/connection_adapters/type_lookup_test.rb b/activerecord/test/cases/connection_adapters/type_lookup_test.rb
index 05c57985a1..7566863653 100644
--- a/activerecord/test/cases/connection_adapters/type_lookup_test.rb
+++ b/activerecord/test/cases/connection_adapters/type_lookup_test.rb
@@ -81,7 +81,11 @@ module ActiveRecord
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
diff --git a/activerecord/test/cases/migration/change_schema_test.rb b/activerecord/test/cases/migration/change_schema_test.rb
index 46a62c272f..83e50048ec 100644
--- a/activerecord/test/cases/migration/change_schema_test.rb
+++ b/activerecord/test/cases/migration/change_schema_test.rb
@@ -105,7 +105,7 @@ module ActiveRecord
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