Bug #58926 Forward Engineer CREATE script doesn't create primary keys (for ident relationsh
Submitted: 14 Dec 2010 18:57 Modified: 7 Mar 2011 13:19
Reporter: Bastaya Hijo Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.2.31 OS:Any
Assigned to: Alexander Musienko CPU Architecture:Any
Tags: regression

[14 Dec 2010 18:57] Bastaya Hijo
Description:
I have a .mwb file from an old version (5.1.18), and loaded it on 5.2.31 -- the data is correct in modeler, but when I forward engineer the create script (comparing to the old 5.1.19 sql script), it doesn't generate the primary keys. I can still see the primary keys defined in the modeler in 5.2.31, but it removes some of them when I forward engineer the CREATE script.

I have tried this with both Mac and Ubuntu versions of 5.2.31 and the problem persists, rendering my old .mwb file useless.

I have attached my .mwb file.

How to repeat:
Create a model file with primary keys in 5.1.18. Generate a SQL create script, and then load the .mwb file into 5.2.31. Then try to forward engineer the CREATE script; you will notice some primary keys are (randomly?) dropped.
[14 Dec 2010 19:24] Valeriy Kravchuk
Yes, I see the problem with account_email table, for example. Verified on Mac OS X.
[15 Dec 2010 4:18] Alfredo Kojima
This occurs with any primary key that is also a FK (ie, in identifying relationships)
[3 Mar 2011 13:38] Johannes Taxacher
fix confirmed in repository
[7 Mar 2011 13:19] Tony Bedford
An entry has been added to the 5.2.32 changelog: 

When a model was forward engineered the primary keys were not created in the 
generated script.