Will getting latest change remove any existing table rows?

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

Will getting latest change remove any existing table rows?

Postby jrummell » Wed Feb 09, 2011 2:41 pm

Will getting latest change remove any existing table rows in changed tables? I don't want to lose my test data.
jrummell
 
Posts: 4
Joined: Wed Nov 15, 2006 3:08 pm

Postby MartinU » Wed Feb 09, 2011 4:54 pm

This is a must for us to be able to move to SSC from Visual Studio. The most appealing aspect of SSC is the performance compared to VS. However, if we have to replace our data each "get latest" operation then I believe the benefit will be negligible and we will stay with VS.
MartinU
 
Posts: 13
Joined: Wed Feb 09, 2011 4:43 pm

Postby David Atkinson » Sat Feb 12, 2011 6:45 pm

If I understand the question, are you asking whether 'get latest' will wipe all pre-existing data from your linked development database?

Rest assured that SQL Source Control will preserve your existing data in this circumstance. Tables will be ALTERed where possible. In some situations they will need to be rebuilt, in which case SQL Source Control will create a temporary table in which the data is copied, and then replaces it once the table has be recreated.

I'd encourage you to test the tool on a few of your own scenarios to fully satisfy yourself that the behavior is how you expect it to be, and of course let us know if it falls short.

Kind regards,

David Atkinson
Product Manager
Red Gate Software
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Postby MartinU » Mon Feb 14, 2011 1:27 pm

Correct, my concern is of existing testing data not so much the static data as we already replace thaton each Visual Studio deployment operation.

Take a c# programmer for example debugging and testing their code they may have populated their local DB with testing data. However, they need to get latest on the DB so they are certain they are coding against the most recent schema.

We would not want their test data to removed.
MartinU
 
Posts: 13
Joined: Wed Feb 09, 2011 4:43 pm

Postby David Atkinson » Mon Feb 14, 2011 1:29 pm

In that case it should be fine. The only exceptions are when you are getting latest on a table where a column has been truncated or removed. In this case the data will be lost and not recoverable by the undo feature, as it isn't in source control.

In other cases, we preserve the pre-existing data.

Kind regards,

David
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase


Return to SQL Source Control 1

Who is online

Users browsing this forum: No registered users and 0 guests