Plugin for check constraints?


#1

Hi everyone.

I have a quick question. I’m wondering if there’s a Rails plugin along
the lines of foreign_key_migrations, but for check constraints. (I
found mig-constraints already, but that’s apparently not maintained and
doesn’t seem to work.) Basically, I’d like to be able to do something
like

add_column :rating, :integer, :check => ‘<= 5’

and have the check constraint generated.

If no one can refer me to a suitable plugin, I think I’ll start hacking
foreign_key_migrations to add this feature.

Best,

Marnen Laibow-Koser
removed_email_address@domain.invalid
http://www.marnen.org