Login | Register
My pages Projects Community openCollabNet

Reply to message

* = Required fields
* Subject
* Body
Send reply to
Author (directly in email)
Please type the letters in the image above.

Original message

Author hlellelid
Full name Hans Lellelid
Date 2004-04-12 12:42:38 PDT
Message Hi Matt & Denny,

I applied the fix below to the foreignkey.tpl template. If you update
from CVS this should be there.

I ended up using Matt's code w/o modification:

> <?php foreach ($table->getForeignKeys() as $fk) { ?>
> INDEX (<?php echo $fk->getLocalCol​umnNames()?>),
> FOREIGN KEY (<?php echo $fk->getLocalCol​umnNames()?>) REFERENCES
> <?php echo $fk->getForeignTableName() ?> (<?php echo
> $fk->getForeignColumnNames() ?>),
> <?php } ?>

since MySQL/InnoDB does not complain if you define an index more than
once. That made it easier than needing to check to see whether index
already existed -- and I wasn't completely sure what would happen if
column was part of another multi-column index, etc. We'll keep it like
this unless someone has trouble with it.


To unsubscribe, e-mail: users-unsubscribe@pr​opel.tigris.org
For additional commands, e-mail: users-help at propel dot tigris dot org