Fixed bug where enums limit were getting set as 0 #6432

wants to merge 1 commit into


None yet
3 participants

This is an old bug where rake db:schema:dump imported all columns with the type enum as :limit => 0, making schema.rb don't work on with anything that relies on it(db:schema:load).

This issue were raised here:

And there's other posts on the web about it.

I solved it by setting the limit as the biggest enum value string size. I wonder if shouldn't we just set it as like 255 to only make it work.

I think it's also time that rails supports enum columns. There's plugins that do that, but I would gadly make it work.

Feel free to comment about the code or the regexp, I will also gadly change it.


rafaelfranca commented Jun 11, 2012

@thiagofm how about the mysql2 adapted? Did you see any way to test this?

There are no tests... so I will write some tests for it then.

@senny senny added enum and removed enum labels Sep 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment