Drop not showing as Drop

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace, andy.campbell.smith

Drop not showing as Drop

Postby lackadaisql » Tue Apr 30, 2013 8:24 pm

(This was not working as I expected in an earlier version - and I've updated to 3.3.1.30 - and it is still here... There appear to be variations of this on the forum - sorry if this is a repeat. I'm using GIT - which I suspect is irrelevant for the problem. )

Scenario:
(a ticket was not properly recorded in our GIT repo - so I need to push the changes from dev to git - and sync to another server.)

* There are dropped objects in our GIT repo which have been properly removed from the database. (That developer does not have RedGate SourceControl installed / configured).

* When database is linked to GIT as dedicated database development - no drop script is shown in "Commit". However, the object do show up as new objects on the "Get Latest" tab... (So, I don't see that I need to commit drops, and in fact may need to add erroneously...)

* When the database is linked to GIT as shared database development - then the objects do show up as drop on the "Commit" tab. (I can see my drops, but may miss proper updates from GIT which need be applied).


Why wouldn't an object show as an Add from the perspective of GetLatest - or a Drop from the perspective of Commit? (seems like a major pain to keep track of things this way - but workable - for at the moment, I do not have an option to perform a drop without doing it directly in the repo manually.).

Anyway, is there a suggested workflow / workaround for managing object drops?

Thanks in advance
lackadaisql
 
Posts: 4
Joined: Tue Apr 30, 2013 7:39 pm

Postby james.billings » Fri May 03, 2013 12:23 pm

Thanks for your post.

I'm afraid I'm not quite sure I follow the problem here 100%, but the short answer is that a drop is normally done by a user deleting the object in their database, and then committing that change.
As you're aware, our GIT support only makes changes to / from the local working folder on your machine, we don't push or pull changes to a central repository.

If you later link up a database that doesn't have a certain object in it to a repository that does, then we'll usually show this as an object that needs to be added to the DB rather than the other way around, because there won't be any difference between the database and the "working base" temporary folder that tells us the object was actually delete on the DB side of things.

Depending on what needs to happen, you then either need to manually remove the object from the repository or another user could drop it from their own DB (assuming you're sandboxed/dedicated mode) and commit the drop correctly.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby lackadaisql » Fri May 03, 2013 3:56 pm

Thanks for the response.

Instead of manually deleting - I temporarily switched to shared mode - and removed the object from the working folder. The manual process would've worked as well.

At some point - I'll try to put together an example workflow to illustrate what I so poorly described - in the event that someone finds it useful.
...plus it will give me more time to work with the product - which should be a good thing as well... :)

Thanks again
lackadaisql
 
Posts: 4
Joined: Tue Apr 30, 2013 7:39 pm

Postby james.billings » Fri May 03, 2013 4:02 pm

Sounds good, let us know if you're still stuck!
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Source Control 3

Who is online

Users browsing this forum: No registered users and 2 guests