Model Sync in MySQL Workbench

After reading the documentation for MySQL Workbench, I got the impression that you can change the database on the server (for example, add a new column) and then include DDL changes in the EER diagram. At the very least, it has the option “Synchronize Model” in the “Database” menu. I found this a nice feature because I could use the graphic modeling tool without becoming a captive.

In practice, when I run such a tool, I am offered the following options:

Model Update Source ================ ====== ====== my_database_name --> ! N/A my_table_name --> ! N/A N/A --> ! my_database_name N/A --> ! my_table_name 

I cannot understand this, but leaving it as I basically get:

 DROP SCHEMA my_database_name CREATE SCHEMA my_database_name CREATE TABLE my_table_name 

This is a dump of a model that overwrites all deleted changes to my_table_name.

Do I not understand this feature?

+6
synchronization mysql mysql-workbench data-modeling
source share
3 answers

Fair? I think this is a mistake. I have come across the same problem several times and I am not sure what the problem is.

I suggest checking the error repository and if you find nothing, report it as new.

+3
source share

Here is the real mistake you can follow. http://bugs.mysql.com/bug.php?id=61211 And there is a workaround from one of the QQ mysql people:

The workaround is to open the Scripting Shell, check the schema name and make sure that the oldName field contains the same name as you, in order to synchronize against. Commands for this:

 # print current oldName value print grt.root.wb.doc.physicalModels[0].catalog.schemata[0].oldName # change the oldName field value grt.root.wb.doc.physicalModels[0].catalog.schemata[0].oldName = "newname" 
+6
source share

I always use synchronization successfully several times! But today I have the same problem - and I wonder?

So, I study the MySQL BUG report and find the problem ...

Do not use caps or underscore the database name.

So I:

  • rename my database
  • change the model name in Model Overview
  • and change the default schema name, use in "Connection Settings".

And it works! ... now I need to change the database name in applicationconfig ...

+1
source share

All Articles