These pages cover SQL Source Control versions 3.0 and later. Help for older versions is also available.

We've released a beta version of the improved migration script feature. We'd love to hear what you think.

Skip to end of metadata
Go to start of metadata

Linking to a working folder is only available in SQL Source Control version 3.4 and later.

You can source-control your database with Git, Mercurial, or any other source control system by linking your database to a working folder in your repository.

When you save changes, SQL Source Control scripts out the changes to the working folder as SQL script files. After saving database changes, you can add and/or push and commit the script files manually with your source control client.

If you want to do atomic commits of your database schema together with your application code, you can do this by linking to a working folder. For more information, see Worked example - source-controlling database schema and application code together using a TFS workspace.

Linking to a working folder

  1. Create an empty folder in your source control repository. This will be your working folder.
  2. In the Link to source control dialog box, in the left pane, select Git or Mercurial. For other source control systems, select Working folder.
  3. Specify the location of the working folder you created in step 1.
  4. If you're linking to a database that will be used by multiple developers, make sure This is a shared database is selected.
    For more information, see Database development models.

  5. Click Link.

Your database is linked to the working folder.

  • No labels