Bug #39771 New tables are added to wrong database
Submitted: 1 Oct 2008 10:00 Modified: 9 Oct 2008 8:37
Reporter: Bas van Gaalen Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.25 OS:Any
Assigned to: CPU Architecture:Any
Tags: create, database, table

[1 Oct 2008 10:00] Bas van Gaalen
Description:
I have a model with tables in different databases. And, for reasons unknown, when creating a new table, it's always added to the wrong database (the last one in the catalog list).

Moving the table to another database seems hard to do. I have to go back to the Physical Schemata tab on the main page, cut the table from one DB and paste it back to another DB.

(I've set severity to 'serious', since it's annoying enough to be serious, but maybe this is really a feature request. Alter severity as you see fit.)

How to repeat:
Create a model with 2 or more DB's and try controlling in which DB the tables are created when using the table create options of the model view.

Suggested fix:
Re-use Mysql Query Browser functionality, where you can double-click a DB to make it 'active'.

Also adding drag-and-drop functionality for tables between DB's would be cool.
[1 Oct 2008 11:40] MySQL Verification Team
Thank you for the bug report. Could you please provide a model test case. Thanks in advance.
[7 Oct 2008 9:38] Bas van Gaalen
There's no need to provide a model for testing, I mean... Just create a new document, add 2 schema's from within the Physical Schemata area, then switch to the model (choose 'Add Diagram' first) and from the model view, try to add tables to both the databases. I'm not sure how to do this.

As far as I can see this is only possible from within the Physical Schemata.
[8 Oct 2008 12:49] MySQL Verification Team
Thank you for the feedback.
[8 Oct 2008 16:47] Johannes Taxacher
when you click the table-tool in diagram mode, the upper toolbar changes. in this toolbar you can then specify schema, table-engine, collation, color for the table thats being placed. This toolbar remembers last setting. this way you'd be able to control what you're looking for.
was that the feature you were looking for, or does this feature have a bug (works for me here) ... if its buggy please provide further info and set it back to open.

thx
[9 Oct 2008 8:37] Bas van Gaalen
You're right, my bad... Thx :)