How can we help you today? How can we help you today?

Using the Change Automation for VSTS Dropped all of the tables in my target DB

Redgate SQL Change Automation: Build builds my change automation project to a nuget package. 
The build artifact contains a baseline script generated with the creation of the project in VS 
Redgate SQL Change Automation: Release then runs using that artifact.

I have opened the nuget package and verified that it looks alright.

The process then DROPS all the tables, procedures and functions in the database. Leaving me with no data... 

blink1217
0

Comments

5 comments

  • way0utwest
    I'm really sorry that happened. This shouldn't be how this works, and I hope we can help you.

    A couple things. First, when you say the nuget package looks alright, can you explain what you mean here? I assume you mean that you see an 001_xxx script for the baseline and then some 002_yyyy, 003_zzz scripts for migrations?

    What did you run as far as SQL Change Automation. There are lots of cmdlets here that can be run, so can you describe the release process steps?
    way0utwest
    0
  • blink1217


    There was no migration there was only one baseline file.
    blink1217
    0
  • Sergio R
    It looks like this is happening because in the Build settings, the operation is set to "Build a SQL Source Control Project".

     You need to change this to "Build a SQL Change Automation Project" and then re-run the build and create a new release.



    Sergio R
    0
  • Monday
    It seems like it would be prudent, if its possible, that when the operation does not match the project type in the package to throw an error on build or deployment and stop.
    Monday
    0
  • Sergio R
    @Monday That's a very good suggestion, I have discussed this with our development team and we agree with you.

    We are going to investigate how to implement this in the tool.

    Please keep an eye on the release notes for any updates regarding this:
    https://documentation.red-gate.com/sca3/release-notes-and-other-versions/powershell-module-release-notes

    Sergio R
    0

Add comment

Please sign in to leave a comment.