Plugin for check constraints?

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

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.


Marnen Laibow-Koser
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs