Bug #61211 | Rename database schema makes synchronisation impossible | ||
---|---|---|---|
Submitted: | 18 May 2011 6:54 | Modified: | 27 Jul 2012 8:45 |
Reporter: | Maxime MARAIS | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench: Modeling | Severity: | S2 (Serious) |
Version: | 5.2.33 CE | OS: | Windows (7Ux64) |
Assigned to: | CPU Architecture: | Any | |
Tags: | rename, schema, synchronisation |
[18 May 2011 6:54]
Maxime MARAIS
[18 May 2011 7:02]
Valeriy Kravchuk
Thank you for the problem report and detailed workaround description.
[18 May 2011 12:49]
Alfredo Kojima
marked bug #61157 as duplicate
[18 May 2011 12:50]
Alfredo Kojima
A workaround is to open the Scripting Shell, inspect the name of the schema and make sure that the oldName field contains the same name as what you're trying to synchronize against. Commands for that are: # 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"
[20 Jun 2011 15:35]
Rok Dominko
@Alfredo: your "workaround" chrashes my Workbench (version 5.2.34 CE) This bug is know for more than a year now. Is it too dificult to fix or is there some other reason, why this hasn't been fixed by now?
[20 Jun 2011 16:10]
Alfredo Kojima
This bug is more complex than it may look from the surface because there are several special cases involves and time is needed to properly come up with an acceptable solution and implement it. However it is already relatively high on our priority list and it will be eventually be fixed, please be patient.
[22 Feb 2012 8:54]
Wojciech Mocarski
Hi, Is there any progress accourding to the issue? Regards Wojtek
[28 Mar 2012 9:27]
Bogdan Yurov
Please, fix it ASAP. Nearly every week see this bug
[3 May 2012 6:58]
Paul Rigney
If you are using linux I have writen a shell script to replace steps 2-8 of the manual process that Maxime MARAIS wrote. Just run the script against your save .mwb file (but back it up 1st) #!/bin/sh # # Rename an mwb file in mysql workbench # usage # dbw.sh db.mwb oldschemaname newschemaname # Author Paul Rigney unzip $1 cat document.mwb.xml | sed "s/$2/$3/g" > document.mwb.xml.$$ mv document.mwb.xml.$$ document.mwb.xml zip $3.mwb @db/ document.mwb.xml lock rm -fr @db document.mwb.xml lock
[12 May 2012 19:04]
Ted Yates
Any updates on this bug? Fixed, it would be a well used feature. First reported June, 2009 #45533. Thanks for the fantastic app.
[28 Jun 2012 11:03]
André Ricardo
Hello, can someone post a alternative to: # 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" I tried it in version 5.2.40 / > print grt.root.wb.doc.physicalModels[0].catalog.schemata[0].oldName luart: error: stdin:1: '=' expected near 'grt' I tried the "Copy Path for Python" grt.root.wb.doc.physicalModels[0].catalog.schemata print grt.root.wb.doc.physicalModels[0].catalog.schemata[0].oldName luart: error: stdin:1: '=' expected near 'grt' / > show grt.root.wb.doc.physicalModels[0].catalog.schemata luart: error: stdin:1: object 'grt.root.wb.doc.physicalModels[0].catalog.schemata' not found / > show print grt.root.wb.doc.physicalModels[0].catalog.schemata luart: error: stdin:1: object 'print grt.root.wb.doc.physicalModels[0].catalog.schemata' not found
[4 Jul 2012 12:29]
André Ricardo
Paul Rigney's script still works! Thank you Paul!
[27 Jul 2012 8:45]
Philip Olson
Fixed as of Workbench 5.2.41, and here's the changelog entry: The synchronization wizard now allows the possibility to force synchronization of schemas that are thought to have been renamed. Otherwise, MySQL Workbench will recreate the schema from scratch.