Get Latest showing dropped objects
amumaugh
Posts: 17 Bronze 1
I have a database fully committed to source control but when I switch to the "Get Latest" tab, it shows me objects that have been dropped. They are obviously not supposed to be there as I have just committed all changes from the exact same db.
Comments
- linked a database to source control.
- committed all objects
- went to Get Latest, and saw drops listed.
Are the drops for the same objects you just committed? What sort of time was there between when you committed, and when you went to Get Latest? Are other users also linked to the same source control location, and if so, do they have their own local databases (Dedicated) or do you all work on the same database (Shared)? Does the problem clear itself if you unlink + relink the database?
Redgate Software
To answer your questions more directly:
The objects are not the same objects just committed. Since these weren't the objects just committed, I would say anywhere from 1 week to several months between when the drops were committed and when I tried to get latest. There are no other developers linked to the source control location, although I have 2 different machines that I develop on linked to the same place. Unlink and relink does not resolve the issue.
It's basically like a/some commit(s) for dropped objects did not take in source control.
Drops on the Get Latest tab will be where you have the object in your local database, but not in the source control repo. So if this is showing up objects that have been dropped over a period of a couple of months, it sounds like the local DB still has them in.
Normally when you want to link a "fresh" database to source control, you can skip the restore, and instead create a new blank DB then just do a Get Latest.
Redgate Software
A backup is used because of the complexity of our structure and data. A close to complete data set is needed for testing so a backup is easier than a fresh db and ETL. Either way, the comparison would still create those objects that should no longer actually be in source control because they were dropped and supposedly committed.
If they are listed as Adds, then yes, it does sound like previous commits didn't get rid of them for some reason. Seems a little odd, if there was a problem deleting the file I would have expected an error to be thrown.
One workaround, depending on the number of objects, would be to delete the files manually from your Repo (using Tortoise for example, if you're working with SVN) and refreshing.
Failing that, if you're happy your local DB is up-to-date you could remove the folder completely from your repo, recreate it, then perform an "initial" commit again.
Redgate Software
I don't want to start over in the repo because then I lose all of my history.
Redgate Software
Redgate Software