0

I have added a tsql-test to my deployment scripts that make them run only on the server that they are supposed to run on.

Now, I would like to make sure that they won't run if the server is not running the same version as it was when the script was created.

The version (ChangeSet) is stored in an Extended Property of the database, so I would like to add tsql that compares that value to the Changeset that is being pulbished. I already have that value.

What I don't have is the mechanism to (in msbuild) get the current database ChangeSet (in the extended property of the target database) value when the script is created..

Daniel Perník
  • 5,464
  • 2
  • 38
  • 46
SAS
  • 3,943
  • 2
  • 27
  • 48

1 Answers1

0

I solved it by comparing $(ChangeSets) with the value in extended properties of the target database where I store the version number from the deployment script (in a sql-script that is included at the top of the deployment script).

SAS
  • 3,943
  • 2
  • 27
  • 48