Forum: Ruby on Rails Plugin for check constraints?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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
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
This topic is locked and can not be replied to.