chucknorris / roundhouse

RoundhousE is a Database Migration Utility for .NET using sql files and versioning based on source control

Home Page:http://projectroundhouse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhancement: RunAfterCreateDatabase folder

ferventcoder opened this issue · comments

This should have scripts that run only once, and only after a database is created. If you are hitting an existing database, these should not run.

This will run just after the alter database statements. This will not run if the database is created during a restore.

Fixed sql 2000 here: a184588

Oh excellent. This is exactly what I wanted for baseline work.

Is it by design that this also doesn't run if you specify a custom script for CreateDatabaseCustomScript, for example?

/cds=%sql.files.directory%\custom_db_create.sql

It doesn't if you do not return true that a db was created, this is true.

Cheers Rob,

For the time being I've lumped the custom database create logic in with one of the scripts in the runAfterCreateDatabase folder and it does a load of ALTER DATABASE statements. It seems a bit clunky though. Is there a simple way for me to return true that a db was created when using -cds ?

Worked perfectly, thanks @ferventcoder