Friday, 29 December 2006

Rails: Staying away from Enums in Migrations (ruby)

I was fiddling with migrations, and found these regarding the use of MySQL-ish ENUMs in Migrations:

Basically, ENUMs aren't supported, and using Validations might be a good work-around, but is dependent on you putting (and keeping) all of the logic in your Rails app. If you need to go cross-app (with some other thing that ain't rails), then use CHECK or other DB constraints to enforce desired values.

erin posted this on 29 December 2006, 02:48 PM · updated 29 December 2006, 02:52 PM
[code]