#63 new
ronin-29049 (at lighthouseapp)

should_have_fk_constraint?

Reported by ronin-29049 (at lighthouseapp) | August 15th, 2008 @ 07:08 PM

Despite the fact that the the management of foreign key constraints is (sadly) not built into Rails at this time, it might be nice to have a macro that check to make sure they are there.

Perhaps you could call something like: should_have_fk_constraint :customer_id, :on_update => :cascade, :on_delete => :cascade

Comments and changes to this ticket

  • ronin-29049 (at lighthouseapp)

    ronin-29049 (at lighthouseapp) August 15th, 2008 @ 07:13 PM

    • → Tag changed from “active_record_helper macros should_require_attributes” to “active_record_helper enhancement macros”
    • → Title changed from “should_require_attributes fails when it should pass” to “should_have_fk_constraint?”

    Despite the fact that the the management of foreign key constraints is (sadly) not built into Rails at this time, it might be nice to have a macro that check to make sure they are there.

    Perhaps you could call something like: should_have_fk_constraint :customer_id, :on_update => :cascade, :on_delete => :cascade

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket