Bug #36453 Problem with FOREIGN keys
Submitted: 1 May 2008 13:41 Modified: 22 Aug 2008 16:00
Reporter: Sergey Romanov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.21 OS:Windows (XP SP2)
Assigned to: Alfredo Kojima CPU Architecture:Any

[1 May 2008 13:41] Sergey Romanov
Description:
After I have changed latest RC SE version to OSS I have found that all FOREIGN keys, created in SE version have INDEX type, not FOREIGN (in Indexes tab) and I can not change type to FOREIGN.
After export to sql file I can see that CREATE command is correct, i.e. with CONSTRAIN, FOREIGN KEY and etc.
When I create new FOREIGN key (in diagram with 'Place a Relationship Using Existing Columns') then all is ok and I can see FOREIGN key type. 
Relations in SE was created with 'Place a New 1:n Identifying Relationship'.

How to repeat:
Try to open file with foreign keys created with SE.

Suggested fix:
WB should show correct index type.
[2 May 2008 14:39] MySQL Verification Team
Thank you for the bug report.
[2 May 2008 15:33] Alfredo Kojima
Please upload an example model file which shows this problem.
[20 May 2008 12:26] Alfredo Kojima
I've changed the editor so that you can manually force an index to be of type FOREIGN.
This should be used for workaround purposes only.
[21 May 2008 19:50] Johannes Taxacher
as mentioned by developer, only use this for correction-purposes as Workbench sets that indextype automatically. This is only for models, created with older versions of wb that didn't support the FOREIGN type. Indexes set to FOREIGN cannot be changed back manually to INDEX (except by using the undo feature).
[10 Jul 2008 9:10] Tony Bedford
Did this change make it into 5.0.22?
[14 Aug 2008 10:58] Johannes Taxacher
yes, fix was included in 5.0.22
[22 Aug 2008 16:00] Tony Bedford
An entry was added to the 5.0.22 changelog:

When opening a model created with an earlier version of Workbench, the Indexes tab displayed indexes of type FOREIGN as type INDEX, and it was not possible to change them back to FOREIGN.