Closed cypok closed 13 years ago
First — thanks for pointing on ack
, it is much better than grep
:)
About your issue: dump uses standard rails rake tasks db:schema:dump
and db:schema:load
, to dump schema, so it is most probably rails/mysql issue. I tried to create table with limit of 16777215 (16.megabytes - 1
) and mysql describe said that it is longtext, not mediumtext (with rails 3 run rails db
and run describe …;
). Further investigation gave me that maximum limit which creates mediumtext is 5592405 (it is (4 + 1).megabytes + (256 + 64 + 16 + 4 + 1).kilobytes + (256 + 64 + 16 + 4 + 1)
) and adding 1 to it gives longtext, very strange number and I think that this has something to do with utf-8.
Also rails is not beware of such things, so if you set limit in migration for example to 4.megabytes and migrate, you will have mediumtext in db, but shema will get limit of 16777215, than, if you just load schema with rake db:schema:load
, schema will still have limit of 16777215, but mysql will contain longtext, and if you run rake db:schema:dump
, shema will get its limit of 2147483647.
I've got mysql database. One table has column with type mediumtext (16Mb). So I create dump, restore it, .. And column transforms to longtext (2Gb)!
I've tried to find out what happens, but couldn't. Can you?