How to update to a specific revision from source control

You can update your SQL Server or SQL Azure database to a specific revision from source control using the Schema Compare for SQL Server tool.

Note

If you update your database to a particular revision, the current database schema will be overwritten with the changes introduced with the selected version.

Update to a revision from source control using the schema comparison tool

You will need Schema Compare for SQL Server to update the database schema.

For detailed instructions, please refer to our guide on how to update to a revision from source control using Schema Compare for SQL Server.

Update to a specific revision manually

Update to a specific version using Git

To update to a specific version using Git

1. Using a Git client, check out the revision you want to update your database to.

2. Launch Schema Compare for SQL Server and click New Schema Comparison.

3. In the New Schema Comparison Wizard under Source select Scripts Folder and then select the folder with database scripts.

4. Under Target, in the Type box, select Database. Then specify a connection and select a database.

5. Click Compare.

6. In the Comparison results window, that will open, click Synchronize.

The database is updated to the revision you’ve checked out.

Update to a specific version using TortoiseSVN

To update to a specific version using TortoiseSVN

1. Check out the latest version to a new folder.

2. Right-click the folder, then select Show log from the TortoiseSVN context menu.

3. In the Log Messages window that opens, right-click the revision you want to update to, and click Revert to this revision.

4. In the confirmation dialog box that opens, click Revert.

The folder with database scripts will be updated to the revision you selected.

5. In Schema Compare for SQL Server, set the scripts folder as the source for a comparison, and the database as the target, then compare and synchronize.

The database is updated to the required revision.