Skip to main content
Solved

Is it possible to generate a 'DB' script with a different database name than used before?

  • February 21, 2019
  • 3 replies
  • 136 views

Mark Jongeling
Administrator
Forum|alt.badge.img+23
In a project I work on, we would like to generate scripts for them and create a database named differently than we have.
For example: our application/database is called 'Original', now I would like to generate all scripts but change the to-be-created database name to 'Customer' without having to edit the scripts or open them in the SQL Server Management Studio and run them myself. (One-click deployment)

Connecting to the database 'Customer', which does not exists yet, will ensure the checkboxes (in the 'Execute source code' step) are checked accordingly. The 'DB' and the 'Create' scripts are checked and the generated script will run on the given database. But sadly the first script does not contain the 'Customer' database name, but the 'Original' name. So an error will occur since it tries to create a database that already exists, or even worse, make a database which will not be used.

Where can I change this?

I noticed that the Runtime configuration does affect the generation of the 'DB' script but is this the only way?

Best answer by Anne Buit

Hi Mark,

You are correct, in 2018.3 the fields Dave was writing about have been moved. These settings can now be found in the menu, under Deployment - Runtime configurations.

The database name used in the default runtime configuration will be used in database creation scripts.
View original
Did this topic help you find an answer to your question?

3 replies

Dave Bieleveld
Rookie
Forum|alt.badge.img
There is a field called "Database name", in the projectversion of a project. This is where you can set the name of the database, which is used when the DB-scripts are generated.


This implies that you can set a different database for each project version or branch. It is not common to change the database name for a projectversion of a project, since it's not likely to change in time.

It's more common that you change the name of the database of a branch version, because you have to use different database names for development or test purposes. But the trunk version will allways have the same, unchanged databasename.

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Author
  • Administrator
  • 3936 replies
  • February 21, 2019
Dave Bieleveld wrote:
There is a field called "Database name", in the projectversion of a project. This is where you can set the name of the database, which is used when the DB-scripts are generated.


This implies that you can set a different database for each project version or branch. It is not common to change the database name for a projectversion of a project, since it's not likely to change in time.

It's more common that you change the name of the database of a branch version, because you have to use different database names for development or test purposes. But the trunk version will allways have the same, unchanged databasename.


Thank you for your answer Dave. I'm sad to see that I don't have this option. Are you using the 2018.3 version of the Software Factory? I did notice in the Configuration under Settings that I can name a database name, maybe it does the same thing as you described. But I'm worried that will not be version based.


Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 637 replies
  • Answer
  • February 21, 2019
Hi Mark,

You are correct, in 2018.3 the fields Dave was writing about have been moved. These settings can now be found in the menu, under Deployment - Runtime configurations.

The database name used in the default runtime configuration will be used in database creation scripts.

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings