Undo a commit?
We have downloaded the Redgate Source Control and SQL Compare Pro trials. We have a SQL Server environment and Subversion server (shared development model). After installing the Redgate software, we linked a database to source control and were successful in doing so; including committing changes and viewing revision history.
Question: during our tests, we created one Subversion repository with the idea of using just 1 SQL database during our source control tests. One of our testers accidentally connected 2 SQL databases to the 1 Subversion repository and performed the initial commit. We have noticed that our 1 repository now contains the mix of all objects from the 2 databases; including the history of commits for both databases shows in 1 screen.
It looks like we need to create 1 repository per database in order to keep things clear and separated. However, is there any way to undo his commit of the 2nd database to the 1 repository? If we can undo that initial commit, then at least the repository will be just for 1 database again. I tried to undo the commit but I seem to have to use SQL Compare, which I’m afraid will not just remove the committed items but also run the SQL scripts to remove the actual objects in the 2nd database …
Comments
Product Manager
Redgate Software
We have unlinked one of the 2 databases but those items are still showing up in the repository. How do we get rid of them? (without affecting the actual database; we just want to clean up the repository as if the 2nd database was never linked)
1) Follow my instructions as described above.
2) Load SQL Compare and put database 1 as the source and the reverted scripts folder from step 1 as the target
3) Run a "deployment". This will fix any differences between "the point in the past" and database 1
4) Commit the changes in your working folder back to the SVN repository
Product Manager
Redgate Software