rails/rails — Issue #3931: schema.db turns mediumtext columns into longtext
Author: pulver
Created: 2011-12-10 22:15:38+00:00
State: open

In Rails 3.1.1 the following migration line creates a column of MySQL type MEDIUMTEXT:

t.text :example, :limit => 0x555555 # this happens to be the maximum length for MEDIUMTEXT. 0x555556 results in LONGTEXT.

however the resulting line in schema.db is

t.text "example", :limit => 16777215

which creates a column of type LONGTEXT.

I would expect that the database column types created by the migration files would be the same as those created by the schema.db file.