-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: RunAfterCreateDatabase folder #20
Comments
This will run just after the alter database statements. This will not run if the database is created during a restore. |
Fixed in 5ec9b4c |
Fixed sql 2000 here: a184588 |
Oh excellent. This is exactly what I wanted for baseline work. |
:D |
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 ? |
yeah, just take a look here at how we do it: https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse.databases.sqlserver/SqlServerDatabase.cs#L145 |
Worked perfectly, thanks @ferventcoder |
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.
The text was updated successfully, but these errors were encountered: