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
Generate schema script, creates wrong order
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.
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.