How to commit custom script in source control & deployment

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

How to commit custom script in source control & deployment

Postby » Thu May 30, 2013 7:01 am

Hi Team,

Most part of our changes are not going to be schema or any other db object changes but it will be from DDLs, inserts, updates and deletes

1. How to make sure DDLs supported in this auto deployment, this is not just for static tables but any data manipulation script for any table

2. How we can commit and deploy the custom script through source control

3. How ordering of scripts can be done when required, there can be situation where script 1 need to be run after script 3 and check in order can be different.

Thanks in advance!!

Posts: 11
Joined: Thu May 30, 2013 6:53 am

Postby james.billings » Mon Jun 03, 2013 11:44 am

Thanks for your post.

Unfortunately you cannot easily commit custom scripts on their own with SQL Source Control.

We have a facility called "Migration Scripts" which lets you add your own scripts (see here) but these are created at the point you commit other changes (you can't create them on an ad-hoc basis)

You also cannot really control the ordering of the scripts. A migration script will cover changes between a pair of revisions of changes; so a script covering an earlier set of revisions would usually get run before a script covering later revisions, however the only way to ensure everything was run in a specific order would be to have one script containing everything.
Posts: 1122
Joined: Wed Jun 16, 2010 10:10 am
Location: Red Gate

Return to SQL Source Control Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests