fk constraint patch for sexy_migrations
Reported by Jim Morris | April 18th, 2007 @ 11:11 PM
This pastie is a diff for sexy migrations, to add the ability to generate foreign key constraints from the foreign_key type.
Comments and changes to this ticket
-
Chris Wanstrath April 18th, 2007 @ 11:11 PM
- 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.
-
Chris Wanstrath April 18th, 2007 @ 11:11 PM
- 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.
-
Chris Wanstrath April 18th, 2007 @ 11:11 PM
- State changed from resolved to open
Right, brain fart.
What if we did it that way? Since
foreign_key
takes a symbol, we couldsymbol.to_s.tableize
and try to use that ifis true? Raise an error if that table isn't found?
-
Chris Wanstrath April 18th, 2007 @ 11:11 PM
Can you try this patch against r186?
I really need to setup some tests for this plugin...
-
Chris Wanstrath April 18th, 2007 @ 11:11 PM
- State changed from open to resolved
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.
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
- Nobody is watching this ticket.