Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

fk constraint patch for sexy_migrations

#4

This pastie is a diff for sexy migrations, to add the ability to generate foreign key constraints from the foreign_key type.

http://pastie.caboo.se/53948

Reported by Jim Morris · April 18th, 2007 @ 11:11 PM

State: resolved
Milestone: none
Assigned to: Chris Wanstrath Chris Wanstrath

Activity

  1. Chris Wanstrath
    Chris Wanstrath
    • State changed from new to open
    • Assigned user set to Chris Wanstrath

    Cool. Can you try out http://pastie.caboo.se/53963 and see if it works? I put the @fk_references stuff inside the each loop since fk can take multiple arguments.

    April 18th, 2007 @ 11:11 PM

  2. Chris Wanstrath
    Chris Wanstrath
    • State changed from open to resolved

    http://require.errtheblog.com/plugins/changeset/186

    Thanks! I spiffed up the README a bit too, don't mind it.

    April 18th, 2007 @ 11:11 PM

  3. Chris Wanstrath
    Chris Wanstrath
    • State changed from resolved to open

    Right, brain fart.

    What if we did it that way? Since foreign_key takes a symbol, we could symbol.to_s.tableize and try to use that if is true? Raise an error if that table isn't found?

    April 18th, 2007 @ 11:11 PM

  4. Chris Wanstrath
    Chris Wanstrath

    Can you try this patch against r186?

    http://pastie.caboo.se/54063

    I really need to setup some tests for this plugin...

    April 18th, 2007 @ 11:11 PM

  5. Chris Wanstrath

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.