Bug #67007 Forward engineer Foreign Key constraints in wrong order
Submitted: 28 Sep 2012 15:15 Modified: 8 Jul 2013 23:46
Reporter: Richard Peng Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.43/5.2.47 OS:MacOS (Darwin 12.2.0)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[28 Sep 2012 15:15] Richard Peng
Description:
Forward engineer always generates Foreign key constraints in alphabetical order, rather than using the order from the referenced table

----- Developer Notes -----

MySQL Workbench CE for Mac OS X version 5.2.43  revision 9869
Configuration Directory: /Users/pengr/Library/Application Support/MySQL/Workbench
Data Directory: /Applications/MySQLWorkbench.app/Contents/Resources
Cairo Version: 1.9.1
OS: Darwin 12.2.0
CPU: 8x Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz, 8.0 GB RAM

How to repeat:
Here's an example schema that was generated by forward engineer with this issue: http://pastebin.com/H9NqCkQ8
All instances of REFERENCES `mydb`.`video_part` (`part` , `video_id` ) should be REFERENCES `mydb`.`video_part` (`video_id` , `part` )
[9 Oct 2012 0:58] MySQL Verification Team
Could you please provide the project model file (private if you wish). Thanks.
[22 Feb 2013 19:05] MySQL Verification Team
Thank you for the feedback.
[8 Jul 2013 23:41] Alfredo Kojima
Fixing category, doesn't seem to have anything to do with migration.
[8 Jul 2013 23:46] Alfredo Kojima
This is a duplicate of bug #62930
which has been fixed in the repository.
Note that to fully fix the issue, you must force the foreign key to be recreated in your model (by clicking and re-clicking one of the FK columns in the FK definition) using the version of WB where the fix is included.