SCA seems to try and delete my database rather than update it.
l570
Posts: 16 Bronze 1
I recently delivered a compiled nuget package from our build server (TFS 2015 with VSTS style build) to our QA department to update their test environment. Per my previous discussion on this board, I directed them to start with an empty target database. They went though the following steps to deploy:
Working together, we modified our approach to check what was attempting to deploy:
I then compiled the project locally and generated the DATABASENAME-Package.sql file as well as the ps1 file. We ran that script and the database was fully populated with tables, views, etc. I repeated the steps above to export the database release artifact. The update script created wanted to drop all tables, views, stored procedures, etc from my database. It wanted to empty it out.
What's going on?????
- $production = New-DatabaseConnection -ServerInstance "SERVERINSTANCE" -Database "DATABASENAME"
- $package ='PACKAGETITLE.nupkg'
- $build = Import-DatabaseBuildArtifact $package
- $release = New-DatabaseReleaseArtifact -Source $build -Target $production
- Use-DatabaseReleaseArtifact $release -DeployTo $production
Working together, we modified our approach to check what was attempting to deploy:
- $production = New-DatabaseConnection -serverinstance SERVERINSTANCE -Database DATABASENAME
- Test-DatabaseConnection $production
- $file = 'PACKAGETITLE.nupkg'
- $build = Import-DatabaseBuildArtifact $file
- $release = New-DatabaseReleaseArtifact -Source $build -Target $production
- Export-DatabaseReleaseArtifact -InputObject $release -Path C:\temp\FOLDER -Force -Verbose
I then compiled the project locally and generated the DATABASENAME-Package.sql file as well as the ps1 file. We ran that script and the database was fully populated with tables, views, etc. I repeated the steps above to export the database release artifact. The update script created wanted to drop all tables, views, stored procedures, etc from my database. It wanted to empty it out.
What's going on?????
Tagged:
Answers
Sorry you're running into this strange issue!
It would be helpful to know what version of SCA you are using, and if possible, share the full log file and also the release artifact with us.
We've opened a support ticket for you and I will follow up with you there.
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?