What are the challenges you face when working across database platforms? Take the survey

DML automation artifact

Newbie here, trying to learn the Database Ci/cd. We use the Redgate source control and other products.

We are working on a task to bring our database under version and follow the CI/CD process for the build and deployment. 
As part of this,we added a test database to source control. When I add a new object to the DB and commit that to source control, the artifact that TeamCity generates the using  DLM plugin includes all the objects. How can configure the build such that I only generate the script of the change?  


  • Options
    @vvt when you use SQL Source Control you're using the state based source control process, so naturally the build artifact from the build will be the whole DB (the state of it, as it is in source control)

    You then need to use SQL Change Automation in whatever deployment tooling you're using (Octopus or Bamboo or ADO etc.) to generate a deployment (or "release") artifact from your build artifact (.Nupkg) which will generate the diff upgrade script plus any drift reports against the target.

    It should go:

    DB -> VCS -> Build (produces NuGet Package) -> Release Artifact (folder including drift checks and a target deployment sql script) -> Deploy from release artifact

    This is because a comparison needs to happen between the accepted (and correctly built) state of the DB from the build which resides in the Nuget, and the target DB you're deploying to. 
Sign In or Register to comment.