Roll Back through Team City
VSinha
Posts: 10 New member
in SQL Compare
1. Added new column with foreign key and checked in
2. TeamCity build was successful – #1.0.102
3. Added test data to new column in Azure database.
4. Dropped the new column and foreign key and checked in.
5. TeamCity build was successful (#1.0.103 ) and column along with data removed from Azure database.
6. Reran the build #1.0.102 with revision number 1450.
7. Build successfully restored the column along with foreign key. However, data in column was not restored.
How to restore the data after doing Roll back while running the previous build in Team City
2. TeamCity build was successful – #1.0.102
3. Added test data to new column in Azure database.
4. Dropped the new column and foreign key and checked in.
5. TeamCity build was successful (#1.0.103 ) and column along with data removed from Azure database.
6. Reran the build #1.0.102 with revision number 1450.
7. Build successfully restored the column along with foreign key. However, data in column was not restored.
How to restore the data after doing Roll back while running the previous build in Team City
Tagged:
Comments
If you would like to be able to restore it you need to make sure you have backed up the data somehow first.
How much data are we talking about?
For small (<1000 rows-ish) lookup/reference/static data, tables where devs manage the data (eg product codes, person type), you can use the static data feature of SQL Source Control to version the data so you can roll it back later but this is not suitable for large tables or transactional data.
If you want to be alerted whenever SQL Compare will drop a table you should be able to set the max warning level to your taste to fail/abort the build. I believe column drops are high level warnings.
DevOps Mentor and Coach
Director of DLM Consultants
Creator of Speaking Mentors
Microsoft Data Platform MVP
Friend of Redgate
Twitter / LinkedIn
How have you configured your build? Are you using the Redgate TeamCity plugins to build the scripts maintained by Redgate SQL Source Control/ReadyRoll? If not, what build steps are you using to build/deploy your database?
DevOps Mentor and Coach
Director of DLM Consultants
Creator of Speaking Mentors
Microsoft Data Platform MVP
Friend of Redgate
Twitter / LinkedIn
DevOps Mentor and Coach
Director of DLM Consultants
Creator of Speaking Mentors
Microsoft Data Platform MVP
Friend of Redgate
Twitter / LinkedIn
If you deleted the data, SQL Compare cannot magically get it back. You will need to put in place some other process to backup the data somehow and restore it.
DevOps Mentor and Coach
Director of DLM Consultants
Creator of Speaking Mentors
Microsoft Data Platform MVP
Friend of Redgate
Twitter / LinkedIn