Bug #54501 MySQL Workbench Synchronize With SQL Create Script Doesn't Update the Model
Submitted: 14 Jun 2010 21:18 Modified: 17 Sep 2010 15:36
Reporter: Dave Morehouse Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.22 RC OS:MacOS (10.6.3)
Assigned to: Alexander Musienko CPU Architecture:Any

[14 Jun 2010 21:18] Dave Morehouse
Description:
When I create even a simple model (one table with 2 columns, one for id and another for data), workbench successfully exports my model to a sql create script.  Then if I update the sql script (for example rename a column) and do File / Export / Synchronize with SQL Create Script, whether I pick model --> script or script --> model does not change the diff that is generated between the model and the sql script.  So when I run execute updates, my model always remains unchanged.

How to repeat:
Create a table with an int column named id (pk, nn, uq) and a varchar(10) column named txt.  Export the model to a sql create script.  Update the generated sql script and renamed the column from txt to text.  Now run synchronize and select to update the model.  Next Update Model and notice when you get to the Review SQL Script that the script is the opposite of what you want (it shows as if you wanted to update the sql script).  Click Execute and notice that the model remains unchanged.
[14 Jun 2010 21:19] Dave Morehouse
Here's my generated and then updated sql script.

Attachment: test.sql (application/octet-stream, text), 718 bytes.

[14 Jun 2010 21:20] Dave Morehouse
Here's my simple model.

Attachment: test.mwb (application/octet-stream, text), 5.24 KiB.

[14 Jun 2010 21:21] Dave Morehouse
Open test.mwb and then do a File / Export / Synchronize with SQL Create Script.  Select test.sql and choose to Update Model and then Review and Execute the generated diff script.  Notice that the model remains unaffected.
[15 Jun 2010 4:48] Valeriy Kravchuk
Thank you for the bug report. Verified just as described.
[16 Sep 2010 23:56] Johannes Taxacher
fixed in release (5.2.27)
[17 Sep 2010 15:36] Tony Bedford
An entry has been added to the 5.2.27 changelog:

When an attempt was made to synchronize a modified exported script with the current model, using File, Export, Synchronize with SQL Create Script, the model was not updated.