From f8438ae336f8f7d38c83a178d6ab6a9af635ee6c Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Thu, 15 Oct 2015 04:43:32 +0900 Subject: Fix to correctly schema dump the `tinyblob` Currently `tinyblob` is dumped to `t.binary "tiny_blob", limit: 255`. But `t.binary ... limit: 255` is generating SQL to `varchar(255)`. It is incorrect. This commit fixes this problem. --- activerecord/test/cases/adapters/mysql2/sql_types_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/adapters/mysql2') diff --git a/activerecord/test/cases/adapters/mysql2/sql_types_test.rb b/activerecord/test/cases/adapters/mysql2/sql_types_test.rb index ae505d29c9..4926bc2267 100644 --- a/activerecord/test/cases/adapters/mysql2/sql_types_test.rb +++ b/activerecord/test/cases/adapters/mysql2/sql_types_test.rb @@ -4,7 +4,7 @@ class Mysql2SqlTypesTest < ActiveRecord::Mysql2TestCase def test_binary_types assert_equal 'varbinary(64)', type_to_sql(:binary, 64) assert_equal 'varbinary(4095)', type_to_sql(:binary, 4095) - assert_equal 'blob(4096)', type_to_sql(:binary, 4096) + assert_equal 'blob', type_to_sql(:binary, 4096) assert_equal 'blob', type_to_sql(:binary) end -- cgit v1.2.3