Page 1 of 1

Generate schema script, creates wrong order

Posted: Thu 01 Dec 2011 14:49
by joey_r
When I choose 'generate schema script' from my tables, to create a script that can be used to recreate the database, the create table scripts are always in the wrong order (because of the FK constraints)

So, when I execute the script I get errors.

In this case, I have always have to order the table scripts manually in the script, and this can be a huge work, and makes this function not really helpful.

I see in the release history that this was solved in a previous version (I have 5.0.54) but it does not seem that way.

Anybody any hints to make this a little easier ?

Thanks

Posted: Fri 02 Dec 2011 08:57
by joey_r
Anyone ?

Posted: Fri 02 Dec 2011 09:16
by alexa
Hello,

We are investigating this problem and will get back to you with a result asap.

Posted: Fri 02 Dec 2011 09:24
by joey_r
Thank you !

Maybe it helps to know that now it just uses alphabetical order.

Posted: Fri 02 Dec 2011 14:20
by alexa
Thank you for reporting the issue.

We are aware of the problem and are working on it.

Currently, as a workaround, we suggest you the following:

1. Select required tables in Database Explorer.
2. Invoke the context menu against them.
3. Select the 'Generate Schema Script' item.
4. On the 'Script generation options' page of the 'Generate Schema Script' wizard, unselect the 'Prefix object names with a database name' option.
-or-
1. Select 'Tools->Options' from the main menu. The 'Options' window opens.
2. Go to the 'Text Editor->Code Completion' branch and make sure the 'Load completions from database' option is checked. If not, please select it. To make

the changes take effect, click the 'New SQL' button on the 'SQL' toolbar and wait until the 'Building code completion' process is finished. You may identify

it in the status bar at the bottom of the application window.

Schema script can be also generated as follows:

1. Select a required database in Database Explorer.
2. Invoke the context menu against the database.
3. Select 'Backup and Restore->Backup Database'. The 'Database Backup Wizard' opens.
4. On the 'Backup content' page of the 'Database Backup Wizard', select the 'Structure' option.

Posted: Wed 07 Dec 2011 10:48
by alexa
We would like to let you know that the issue you reported is fixed in the new version 5.0.60 of Devart dbForge Studio for MySQL that is already available for downloading.

Thank you for your help in improving dbForge Studio for MySQL.