Forum: Ruby on Rails Plugin for check constraints?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Marnen L. (Guest)
on 2009-04-11 18:45
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
This topic is locked and can not be replied to.