How can we help you today? How can we help you today?
AlexYates
I like to stick an IF NOT EXISTS CREATE DATABASE script in source control for each of my databases (for each environment). This way I can source control the way I set up stuff like file groups and possibly security at a per database level. This is useful because some of that stuff is not included by default with the Redgate tools or people tend to filter it out. (Who has the same users on DEV and PROD?) Note, add this create script in a parent or sister directory to your SQL Source Control directory. I try to avoid adding my own scripts to the directory you give to Redgate because you can confuse Redgate tools which are designed to parse all the sql scripts in that directory. Then, I add a simple step in Octopus Deploy to run my IF NOT EXISTS CREATE DATABASE script before the "Redgate Deploy from Package" step. Then you know your DB will always exist. There is an Octopus Deploy step template to run a SQL script here: https://library.octopusdeploy.com/step-templates/73f89638-51d1-4fbb-b68f-b71ba9e86720/actiontemplate-sql-execute-script This step template asks you to type the script into the Octopus GUI but it does also accept variable substitution so you could package up your SQL scripts into a different NuGet and reference them from that variable. / comments
I like to stick an IF NOT EXISTS CREATE DATABASE script in source control for each of my databases (for each environment). This way I can source control the way I set up stuff like file groups and ...
0 votes
Forgive me for misunderstanding. How have you configured your build? Are you using the Redgate TeamCity plugins to build the scripts maintained by Redgate SQL Source Control/ReadyRoll? If not, what build steps are you using to build/deploy your database? / comments
Forgive me for misunderstanding. How have you configured your build? Are you using the Redgate TeamCity plugins to build the scripts maintained by Redgate SQL Source Control/ReadyRoll? If not, what...
0 votes
That is fair - and it's a question for someone in the dev team. :-) / comments
That is fair - and it's a question for someone in the dev team. :-)
0 votes