Bug #45025 Create Schema during Syncronization
Submitted: 22 May 2009 8:11 Modified: 30 Mar 2012 2:46
Reporter: Christian Hass Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S4 (Feature request)
Version:5.1.12 OS:Any
Assigned to: CPU Architecture:Any
Tags: Synchronization Create Schema

[22 May 2009 8:11] Christian Hass
Description:
The Synchronization Wizard does not offer any choice to create a schema, if it doesn't exist.

How to repeat:
1. Create a new model. 
2. Give it an unique new schema name.
3. Synchronize it with a database.

Suggested fix:
If no schema named like the model is found, add a way to let workbench create a new schema with the model's name
[26 May 2009 11:35] Susanne Ebrecht
Many thanks for writing a bug report.

Unfortunately, I am not able to follow you here.

What do you mean with schema? Do you mean what MySQL is calling database or do you mean the diagram itself?

Please, provide a step by step description how to reproduce the szenario.
[26 May 2009 13:08] Christian Hass
I'll try to make it more clear.

Yes I mean what MySQL calls a database and which is correlated the catalog name or schema name in the Workbench.

When you create a new model in the Workbench, its catalog / schema name is set to "mydb" as default (see Catalog-tab in the middle box on the right side). You can change this catalog name by double-clicking on the name in this box.
During synchronization (Menu: Database -> Synchronize Model...) MySQL Workbench is looking for a catalog / schema (or call it database as MySQL does) with this name on the database server. If it finds one, the sync process can continue. But if the Workbench doesn't find an existing catalog / schema with this name, the sync process cannot be completed unless you select another existing catalog which are listed. But you cannot create a new catalog, which for example would be necessary during your first (initial import) sync. You have to create it with MySQL Administrator or MySQL Browser.

It would be nice if MySQL Workbench would offer a choice like: Create new catalog "mydb"

Therefore it's more a feature request than a bug report.
[5 Jun 2009 9:34] Valeriy Kravchuk
You will not see mydb if it does not exist on "Select Schemata to Reverse Engineer" step, but then you can choose any existing database and proceed to "Model and Database Differences" step and ask to update only mydb in Source. Then corresponding CREATE SCHEMA will be generated. Isn't it an acceptable way to solve the problem?
[5 Jun 2009 10:22] Christian Hass
You are right... this will work. But why the hell should I choose any existing schemata if I want to create a new one. This is not really comprehensible in my opinion. 

To make it more clear to the user - i.e. improve usability - I would recommend an additional checkbox for "create new schema". I guess, this is just a few lines of code and that's it. The rest of the functionality is already implemented, as you demonstrated.
[30 Mar 2012 2:46] Philip Olson
Fixed as of 5.2.36, and here's the changelog entry:

The "Database", "Synchronize Model..." dialogue now creates a
schema if one does not already exist.