mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
MySQL: correct LONGTEXT and LONGBLOB limits from 2GB to their true 4GB
This commit is contained in:
parent
467e5700e6
commit
39303c0221
3 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
* MySQL: correct LONGTEXT and LONGBLOB limits from 2GB to their true 4GB.
|
||||
|
||||
*Jeremy Kemper*
|
||||
|
||||
* SQLite3Adapter now checks for views in `table_exists?`. Fixes #14041.
|
||||
|
||||
*Girish Sonawane*
|
||||
|
|
|
@ -650,8 +650,8 @@ module ActiveRecord
|
|||
m.register_type %r(tinyblob)i, Type::Binary.new(limit: 255)
|
||||
m.register_type %r(mediumtext)i, Type::Text.new(limit: 16777215)
|
||||
m.register_type %r(mediumblob)i, Type::Binary.new(limit: 16777215)
|
||||
m.register_type %r(longtext)i, Type::Text.new(limit: 2147483647)
|
||||
m.register_type %r(longblob)i, Type::Binary.new(limit: 2147483647)
|
||||
m.register_type %r(longtext)i, Type::Text.new(limit: 2**32 - 1)
|
||||
m.register_type %r(longblob)i, Type::Binary.new(limit: 2**32 - 1)
|
||||
m.register_type %r(^bigint)i, Type::Integer.new(limit: 8)
|
||||
m.register_type %r(^int)i, Type::Integer.new(limit: 4)
|
||||
m.register_type %r(^mediumint)i, Type::Integer.new(limit: 3)
|
||||
|
|
|
@ -219,11 +219,11 @@ class SchemaDumperTest < ActiveRecord::TestCase
|
|||
assert_match %r{t.binary\s+"tiny_blob",\s+limit: 255$}, output
|
||||
assert_match %r{t.binary\s+"normal_blob"$}, output
|
||||
assert_match %r{t.binary\s+"medium_blob",\s+limit: 16777215$}, output
|
||||
assert_match %r{t.binary\s+"long_blob",\s+limit: 2147483647$}, output
|
||||
assert_match %r{t.binary\s+"long_blob",\s+limit: 4294967295$}, output
|
||||
assert_match %r{t.text\s+"tiny_text",\s+limit: 255$}, output
|
||||
assert_match %r{t.text\s+"normal_text"$}, output
|
||||
assert_match %r{t.text\s+"medium_text",\s+limit: 16777215$}, output
|
||||
assert_match %r{t.text\s+"long_text",\s+limit: 2147483647$}, output
|
||||
assert_match %r{t.text\s+"long_text",\s+limit: 4294967295$}, output
|
||||
end
|
||||
|
||||
def test_schema_dumps_index_type
|
||||
|
|
Loading…
Reference in a new issue