Preventing baseline from deploying via command line
I would like to prevent the scripts in my Baseline folder from being executed when I run MSBuild through the command line. I have applied semantic versioning on my project and have applied the setting in the sqlProj to set the baseline. This is the structure of my migrations folder:
Migrations
./1.0.0-Baseline
./. /0001_tables.sql
././0002_userDefinedFunctions.sql
./1.0.1-TestFeature
././0006_createTableTest.sql
I have tried using the BaselineUptoMigration argument however that hasn't seemed to make a difference. Here is a snippet of my MSBUILD
Migrations
./1.0.0-Baseline
./. /0001_tables.sql
././0002_userDefinedFunctions.sql
./1.0.1-TestFeature
././0006_createTableTest.sql
I have tried using the BaselineUptoMigration argument however that hasn't seemed to make a difference. Here is a snippet of my MSBUILD
set-alias msb "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" exec { msb $readyRollDatabaseProject /p:TargetDatabase=$targetDb /p:TargetServer=$targetServer /p:DBDeployOnBuild=True /p:ShadowServer=$shadowServer /p:BaselineUptoMigration=0005_schemas.sql }
Tagged:
Comments
I have three sqlProjects in my solution. When I right clicked on the second or third project and modified the value for 'Set the baseline for existing database....' it updated the first sqlProject in my solution. I am not sure why the properties page doesn't save correctly, also this is a recurring issue. I had to open the sqlProj file myself and modify these values to fix the problem:
Product Manager
Redgate Software
Product Manager
Redgate Software