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.

sexy_migrations foreign keys fail when using :ref

#7

For some reason sexy migrations fail when using the :ref functionality to create real foreign keys. The Ruby MySQL client just says there is a syntax error even there definitely isn't. The exactly same syntax works when copied to MySQL CLi client or CocoaMySQL.

The reason seems to be that the plugin tries to execute multiple commands within a single execute call. I'm not sure whether this should work or not, but anyways it bombs for me.

The fix for this is to move the foreign key declarations to the actual create table command instead of using separate alter table commands. My patch fixes this and has been tested to work in PostgreSQL 8.1 and MySQL 5.1.

Reported by Jarkko Laine · April 20th, 2007 @ 10:00 AM

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

Activity

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.