In rails migration, if I set text column limit to 16777215, and migrate, mysql creates column of type LONGTEXT, but it should create MEDIUMTEXT, as it can store 16Mb - 1 byte, what is wrong (log says that create table column is sent with type text(16777215), so it is something wrong with mysql)? Also spending some time gave me, that maximum limit, which will create MEDIUMTEXT is 5592405 (it is (4 + 1).megabytes + (256 + 64 + 16 + 4 + 1).kilobytes + (256 + 64 + 16 + 4 + 1)
), strange number, what does it mean, something with utf8 char size??
Also this creates rails schema problem: if i create migration and set limit of text column to 4.megabytes, after migrating, I have MEDIUMTEXT column, but in schema.rb, limit is set to 16777215, so running rake db:schema:load
will make that column LONGTEXT, and running rake db:schema:dump
will also set limit of column in schema.rb to 2147483647. What is wrong?