Bug #38869 Sync to same server fails to use model
Submitted: 18 Aug 2008 17:09 Modified: 6 Feb 2013 22:19
Reporter: Scott Noyes Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.24 OS:Windows (XP)
Assigned to: CPU Architecture:Any

[18 Aug 2008 17:09] Scott Noyes
Description:
Attempting to synchronize two databases on the same server fails unless the model is exported first.

How to repeat:
CREATE DATABASE dev; 
USE dev; 
CREATE TABLE t1 (id int, index(id));

CREATE DATABASE prod; 
USE prod; 
CREATE TABLE t1 (id int);

In Workbench:
- Reverse engineer the `dev` db.
- Edit the model and change the name to `prod`.
- Synchronize the model with the `prod` db on the server.

Instead of synchronizing as expected, the left column reports 'N/A' for the Model, which translates to dropping the prod database.

However, if I first export the model as an SQL CREATE script, then attempt the synchronization again, it works as expected.

Suggested fix:
It would be nice if you could also sync two different databases on the same server.
[20 Oct 2008 16:22] Thorsten Fox
Add on (MySQL Workbench SE 5.0.26): If you rename a scheme in the .mwb, and want wo sync to the renamed scheme on the server, the renamed target ist not recognised. Thus, you cannot replicate/synchronise identical schemes under different names! See screen in file.
[20 Oct 2008 16:24] Thorsten Fox
No synchronize to new name possible after renaming scheme

Attachment: MySQLWB_SynchronizeRenameBug.png (image/png, text), 80.05 KiB.

[12 Aug 2010 12:00] Johannes Taxacher
Bug #55942 has been marked as duplicate of this one
[6 Feb 2013 22:19] Alfredo Kojima
This has been fixed in a recent release, you can now force schemas that have different sources but the same name to be synchronized.