Get specific version from source control (SVN: Update to revision)
Instead of Get Latest, I want to be able to get a specific version out of source control and reapply it to the database. This would allow me to rollback changes that were accidentally committed. I should be able to specify what version/revision that I want to go back to.
This is the same as getting a previous version from source control so that I can debug an issue a user found in a previous release.
While SQL Source Control provides a way to view object history, it does require additional tooling to update your database to a specific version from history.
We currently have documentation on how this works here: https://documentation.red-gate.com/soc/common-tasks/update-to-a-revision-from-source-control
Pete Cousins commented
We created tags in SVN when creating a release. Much simpler than using revision numbers.
I was getting ready to provide feedback to suggest this same feature when I came across this article. It would be nice to have in SQL Source Control itself and don't forget to include the ability to bring in static table data saved with a revision. Please no extra tools, just keep it simpe. Rename Get Latest to tab to Get Changes. And then allow a dropdown to choose the revision with "latest" being the default. Would be perfect. Thanks for the great products.
Håkan B commented
I second Adara, Paul and Neil on:
"This functionality should be in THIS tool, and not rely on the use of another RedGate tool"
I agree with Neil and Paul that this should be available directly in SSC. Otherwise you might as well not sell it as a standalone. While SQL Compare is a great tool, it is a _separate_ tool, IMHO.
You're right. This is currently a feature of the SSMS Integration Pack and SQL Compare. It's something we could consider adding directly to SSC in a future release if there is enough demand.
J. de Graaf commented
Will it also then included in de standalone version of SSC? From what I can see in the SSMS Intergration Pack it's a feature of the Integration Pack and not SSC directly. To have it directly available in SSC will be highly appriciated.
Claes Wedin commented
Agree! We branch versions of and label patches...
paul price commented
I'm going to agree with Neil. This functionality should be in THIS tool, and not rely on the use of another RedGate tool (even though I have it).
Neil Burnett commented
This is pretty vital for a revision control system:-) OK, so if there is data in the db then you are screwed, but I work with empty databases to make my changes then add unit tests creating the data for the tests as needed. In this scenario, I really need to be able to switch to another revision quickly and easily. I can use the workaround, but not in long term.
1) "Get" the tagged/labelled version or a specific revision of your schema to a folder using your source control system
2) Use SQL Compare Pro to compare and then synchronize this folder to your development database
A free trial of SQL Compare Pro is available at http://www.red-gate.com/products/SQL_Compare.