Bug #64494 Synchronize model does not sync/generate inserts for table
Submitted: 29 Feb 2012 18:04 Modified: 29 Feb 2012 22:44
Reporter: Rudy Pedraza Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.37, 5.2.38 OS:MacOS
Assigned to: CPU Architecture:Any
Tags: insert, inserts, model, synchronize, synchronize model

[29 Feb 2012 18:04] Rudy Pedraza
Description:
When using the "Synchronize Model" command under the "Database" menu, inserts into the table are ignored completely. They are neither synchronized / inserted a first time or checked for any changes within the table data.

How to repeat:
1) Create a new model
2) Add a table with some columns, then create a few inserts under the inserts tab of the table properties
3) Under the file menu, select "Database" / "Synchronize Model"  to your favorite stored connection
4) Table schema changes are synced, but inserts are ignored completely

Suggested fix:
Update the synchronize command to take table inserts into account. Also, there should be some kind of checking if the one of the columns within the table is an auto-increment and the data in the inserts is NULL for this field. Perhaps it can check every other column except auto-increment fields in this case.
[29 Feb 2012 18:33] Rudy Pedraza
Updated to 5.2.28 on Mac OS X. Confirmed bug exists in the newer version also.
[29 Feb 2012 18:34] Rudy Pedraza
Sorry, typo, that was supposed to be updated to 5.2.38 ****.
[29 Feb 2012 22:40] Alfredo Kojima
The table inserts are used to perform an initial population of the table during Forward Engineering. 
Once the database is created, the behaviour of an initial INSERTs set would be undefined so it is 
excluded from the synchronization script.
[29 Feb 2012 22:41] Alfredo Kojima
It sounds as if you are misusing Synchronization and instead need to use Forward Engineer to create the initial version of your database.
[29 Feb 2012 22:44] Rudy Pedraza
Can we turn this into a feature request then? It would be handy to allow this, even if some option on the model needs to be ticked/set .