Change not recognized in one direction "Get Latest", but not the other direction "Commit"
TerryO
Posts: 4 New member
Had a situation where a hot fix change went into production database. but not updated in source control. Thought I'd sync source control from the production database .via "Commit" compare, with SQL Source control but the result was "No objects with changes to be committed to source control". Then hit refresh and received same No objects message. Clicked on "Get Latest" and the change is detected....but this is the wrong direction. I do not want to overlay the production database change with the code from source control. So, then go to "Commit" and still "No objects with changes to be committed to source control". I close SSMS and start this whole process over again. Finally, I give up and I manually update the code in my local repository with the change and push it up to the remote. I then go back to SQL Source Control window "Get Latest" then "Pull from remote repository" and hit refresh and now source control is in sync. Any ideas what is going on here? Are there any files in the "user\appdate\local\Redgate\SQL Source Control 6" subdirectories that can be deleted to remedy this situation?
Answers
Version: 5.0.1.2528
1. Go to the Setup tab and click to open the working base folder.
2. Undo the SQL Source Control commits back to the time before I committed and remove the changed files.
3. Refresh the "Commit" tab.
What happened for me was that because SQL Source Control doesn't give you a way to undo a commit, it's own working copy still had that commit, and therefore wouldn't show any changes. If your changes weren't at some point committed, I'm not sure if this will work for you, but hopefully it'll help point you in the right direction.
This may also help: https://documentation.red-gate.com/soc5/reference-information/how-sql-source-control-works-behind-the-scenes