Deploying databases using Red Gate’s ‘Migrations v2’ functionality

tl;dr: A solution to deploying database changes that diff tools cannot handle

Migrations v2 offers a way to deploy complex changes (e.g. table renames, new NOT NULL columns and data migrations) using Red Gate SQL Compare by allowing the user to add custom scripts, using Red Gate SQL Source Control when needed. These custom deployment scripts are combined with SQL Compare generated scripts to handle the complete upgrade.

This is how ‘Migrations v2’ works under the hood. I apologise for the low quality of the video:

You can find documentation here. You can download SQL Source Control here.

The right time to automate stuff

Sorry I haven’t posted in a while. The last month or two have been really busy.

I like the idea that if a task has become boring you should automate it. The logic being that stuff becomes boring when you are proficient enough at it that you are following the same steps over and over again. This probably means that you have a pretty clear idea about the steps required to complete the action, and as a result, you are probably ready to automate it.

This week I came to the realization that I always explain the feature ‘migrations v2’ in the same way – and it requires the aid of a notepad and pen. I always draw the same diagrams in the same order and I have started using the same phrases in my explanation based on what people tend to understand.

I realized this when I tried to explain ‘Migrations v2’ during a video conference and I stumbled. I found it very hard to do on the fly without being able to draw diagrams quickly. (My speedy Paint skillz are probably not up to the job!) So on Friday I took fifteen minutes to create a slide-deck containing my trusty diagrams:

Download (PPTX, Unknown)

I shared this internally and one of the sales managers asked me if I could create a recording of how I would talk through these slides for internal training. The result is the video at the start of this post.

Not wanting to sink hours and hours into a training video for the sales team I spent thirty minutes recording and editing a video at my desk. It does the job of explaining how ‘mig v2’ works under the hood but somewhere between the background noise and lack of actual product demo it doesn’t feel suitable to post this on any official Red Gate page – that’s why I’m posting it here.

I hope you find it useful. Please feel free to download and use/share/edit the slides and to share the video however suits you.

Leave a Reply

Your email address will not be published.