Get Not-the-latest

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

Get Not-the-latest

Postby knowbell » Thu Jul 01, 2010 4:47 pm

We are using SVN as the repository.

Does SQL Source Control make it possible to "Get not-the-latest".

In other words, if I want to see the history of an object's changes, and pull in a version other than the latest, can I do that?

If not in the tool, then how could I use another tool (like Tortoise) or command line SVN to accomplish the same goal?

Note that I don't want to revert everyone to that version, just a single development environment.

Thanks.
knowbell
 
Posts: 3
Joined: Thu Jul 01, 2010 4:38 pm

Postby David Atkinson » Thu Jul 01, 2010 4:57 pm

We don't have this integrated into SSMS right now so the process in the meantime is:

1) Using Tortoise (for example) get the old tag/revision of the schema scripts folder to a temporary folder.
2) Load this as the source database in SQL Compare Pro as a scripts folder, and load your dev environment as the target.
3) Run the comparison and synchronization as you would normally do in SQL Compare.

Please let me know if this isn't straightforward.

Regards,

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

Re:

Postby bhoppe » Wed Jul 07, 2010 8:54 pm

David Atkinson wrote:We don't have this integrated into SSMS right now so the process in the meantime is:

1) Using Tortoise (for example) get the old tag/revision of the schema scripts folder to a temporary folder.
2) Load this as the source database in SQL Compare Pro as a scripts folder, and load your dev environment as the target.
3) Run the comparison and synchronization as you would normally do in SQL Compare.

Please let me know if this isn't straightforward.

Regards,

David Atkinson
Red Gate Software


I'm trying to do the same thing with TFS. Can you confirm what I'm doing would be the correct procedure. First, I've created the link to TFS:

1) In Visual Studio, I've created a folder for the DB as $/ProjectA/Databases/TestDatabase
2) I've linked my TestDatabase in SQL Management Studio to this path and commited changes.

Back in Visual Studio, on the folder $/ProjectA/Databases\\TestDatabase, I apply a label "Initial Commit".

Now, lets say down the road, after several changes and updates to the database, I want to get the inital database, I think this would be the procedure:

1) In Visual Studio, on the folder $/ProjectA/Databases\\TestDatabase I get a specific version based on the label "Initial Commit".
2) Then in SQL Compare 8, I set the source to "Scripts Folder" and Target to "Database".
3)I specify my local path C:\\ProjectA\\Databases\\TestDatabase as the scripts folder and the target to my server and the database I want to restore as.
4) Click "copy"

Is this correct?

Thanks,
Brandon
bhoppe
 
Posts: 2
Joined: Wed Jul 07, 2010 8:42 pm

Postby David Atkinson » Wed Jul 07, 2010 9:32 pm

Yes, that's right.

It involves a few more steps than we would have liked, but it's still something fairly understood and straightforward. We'll be adding better SSMS-integrated support for both getting a label to a dev DB and deploying from a label to a target.

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 1 guest