How can we help you today? How can we help you today?
PeterDaniels
I am still wondering about why $ReleaseVersion wasn't automatically sourced from Octopus.Release.Number, though.  Why did I have to create an Octo var and set it? / comments
I am still wondering about why $ReleaseVersion wasn't automatically sourced from Octopus.Release.Number, though.  Why did I have to create an Octo var and set it?
0 votes
@eliassal, I understand this can be confusing. I believe I had similar issues when attempting to deploy to a DB that I thought was empty, but SCA didn't, so it failed to deploy.  For my case,I was able to: 1) uncheck "mark first folder as baseline" in the project settings. 2) add the "skip baseline check" flag to the project settings file by: 2a) right-click on the project file in solution explorer and select "unload project" 2b) right click on the unloaded project file and select "edit" 2c) in the first property group, add the following element: <SlipBaselineCheck>True</SkipBaselineCheck> 2d) save the project file and close it 2e) right click the project file and select "load..." Than you can use the powershell cmdlets to build and deploy. Any rogue objects in your target db might cause SCA to mark the first baseline script in your project as already deployed during the baseline check. I found success with this. I also found success (alternatively) by discovering that my "empty" target db actually had a user that was in the model db. This user caused SCA to decide not to deploy the baseline script to my "empty" db. Removing that user from model and therefore from any new db I created allowed the project to successfully deploy to a new empty target without the "skip baseline check hack. One of these options should work gro you. I hope this is helpful rather than more confusing. -Peter / comments
@eliassal, I understand this can be confusing. I believe I had similar issues when attempting to deploy to a DB that I thought was empty, but SCA didn't, so it failed to deploy.  For my case,I was ...
0 votes
Follow up: since I included the __migrationLog table and its data as part of the initial, non-SCA generated deployment to our "higher" (ops DBA controlled) environments, I was able to introduce the new idea of using a SSQLCM script to the ops DBAs. The second deployment was the addition of a single new migration in a New-DatabaseReleaseArtifact generated TargetedDeploymentScript.sql. I manually modified it to comment out the target sever check, so they would have one script (currently a requirement) for all of their servers. They successfully ran that in uat and load test servers, so we're at least gaining the benefit of SCA generated deployment scripts and tracking in the __migrationLog table. Concurrently, I've had some meetings to introduce the idea of using PowerShell to deploy using the Use-DatabaseReleaseArtifact cmdlet. That would give us the added benefit of snapshot, drift check, etc. as an intermediate step. I've also showed then a taste of my POC using SCA, bamboo, and Octopus deploy, but my sense is we're months (or longer) away from being able to get buy-in for that move. Thank you for your help, Steve. Honored to have a celebrity work with me in the forums. -Peter / comments
Follow up: since I included the __migrationLog table and its data as part of the initial, non-SCA generated deployment to our "higher" (ops DBA controlled) environments, I was able to introduce the...
0 votes