SQL Source Control - 2.1

SQL Source Control

Learning SQL Source Control - 2.1

Working with config files

‑SQL Source Control provides preset XML config files that enable you to automate source control operations for source control systems with a command line interface.

Commands in the config files

The preset config files include the following commands:

Get Latest

Updates the local working folder with latest version in source control.

Commit

Commits all changes in the local working folder to source control.

Add

Adds new files to the local working copy. Changes can then be committed to source control using the Commit command.

Edit

Makes the local working copy of the file(s) available for editing. Changes can then be committed to source control using the Commit command.

Delete

Deletes the file(s) from the local working copy. Changes can then be committed to source control using the Commit command.

Revert

Undoes changes if an error occurs during a commit.

Creating a custom config file

To create a config file for your source control system:

  1. On the Link to Source Control dialog box, click Manage Config Files.
  2. Open Template.xml in an XML editor, and specify commands and verification codes for the source control actions you want to automate.

    Note: Ensure you specify the name you want to use for the config file in the <Name> tag. For example:

    <Name>Darcs</Name>

  3. Save your changes as a new XML file in the default config files folder:

    %USERPROFILE%\AppData\Local\Red Gate\SQL Source Control 2\CommandLineHooks

    Your config file is now available to select in SQL Source Control.

See also

Linking a database to source control

Committing changes

Source controlling data

Getting the latest version

Viewing source control logs / history

Getting a specific version

Deploying a database from source control

Undoing changes

Conflicts

Using SVN bug IDs & TFS work items

Was this article helpful?

Search support
Forums

SQL Source Control

all SQL products

all products