rails/rails — pull request #6432 by thiagofm (2012-05-22 02:22:07+00:00)
Title: Fixed bug where enums limit were getting set as 0

This is an old bug where rake db:schema:dump imported all columns with the type enum with :limit => 0, making schema.rb don't work when you db:schema:load(like on Benchmark tests).

This issue were raised here: https://rails.lighthouseapp.com/projects/8994/tickets/997-dbschemadump-saves-enum-columns-as-varchar0-on-mysql

And there's other posts about it 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.

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