aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-01-30 12:19:00 -0500
committerRafael França <rafaelmfranca@gmail.com>2016-01-30 12:19:00 -0500
commitb789f6dff4e67204f66175155a74c5f74d93c92e (patch)
treef555e323f7847860c156d980d93b3105c5af2dbf /activerecord/test
parent7d18de3bb57fc2f2e392cc424bbaf13d49870caf (diff)
parentd0054b490848fa80f6c2036bd4e4b45293d16394 (diff)
downloadrails-b789f6dff4e67204f66175155a74c5f74d93c92e.tar.gz
rails-b789f6dff4e67204f66175155a74c5f74d93c92e.tar.bz2
rails-b789f6dff4e67204f66175155a74c5f74d93c92e.zip
Merge pull request #23355 from kamipo/fix_bigint_for_enum_columns
Fix `bigint?` for Enum columns in MySQL
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapters/mysql2/enum_test.rb5
-rw-r--r--activerecord/test/schema/mysql2_specific_schema.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/enum_test.rb b/activerecord/test/cases/adapters/mysql2/enum_test.rb
index bb89e893e0..35dbc76d1b 100644
--- a/activerecord/test/cases/adapters/mysql2/enum_test.rb
+++ b/activerecord/test/cases/adapters/mysql2/enum_test.rb
@@ -18,4 +18,9 @@ class Mysql2EnumTest < ActiveRecord::Mysql2TestCase
column = EnumTest.columns_hash['enum_column']
assert_not column.unsigned?
end
+
+ def test_should_not_be_bigint
+ column = EnumTest.columns_hash['enum_column']
+ assert_not column.bigint?
+ end
end
diff --git a/activerecord/test/schema/mysql2_specific_schema.rb b/activerecord/test/schema/mysql2_specific_schema.rb
index 701e6f45b3..16ff6de24d 100644
--- a/activerecord/test/schema/mysql2_specific_schema.rb
+++ b/activerecord/test/schema/mysql2_specific_schema.rb
@@ -62,7 +62,7 @@ SQL
ActiveRecord::Base.connection.execute <<-SQL
CREATE TABLE enum_tests (
- enum_column ENUM('text','blob','tiny','medium','long','unsigned')
+ enum_column ENUM('text','blob','tiny','medium','long','unsigned','bigint')
)
SQL
end