How to commit custom script in source control & deployment

joseph.tgjoseph.tg Posts: 14
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!!

Joseph

Comments

  • James BJames B Posts: 1,124 Silver 4
    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.
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.