MySQL Forums
Forum List  »  MySQL Workbench

Foreign key name and index name have to be the same in workbench???
Posted by: Brian Reindel
Date: July 11, 2009 07:31PM

I could be wrong, but can't an index name for a foreign key constraint be different than the foreign key's name? The issue is that I have two foreign key constraints that reference the same primary key on a third table. I always name my foreign keys the same name as the primary key they reference.

The issue is that no two indexes can be the same name, and so MySQL throws errno 121 when I try to create my tables using the models I designed. However, the workbench won't let me change the index name of a foreign key to be uniquely different. Yet, if I change the foreign key name, then the index name automatically changes to be that of the foreign key.

Options: ReplyQuote


Subject
Views
Written By
Posted
Foreign key name and index name have to be the same in workbench???
3965
July 11, 2009 07:31PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.