Pre/Post Deployment Scripts
SeriousM
Posts: 15
Hi,
we evaluate sql compare for azure db deployment and i wonder how i can add pre/post deployment scripts to the output?
do i need an additional product or do i miss something important?
thanks
we evaluate sql compare for azure db deployment and i wonder how i can add pre/post deployment scripts to the output?
do i need an additional product or do i miss something important?
thanks
Comments
I'm also interested to know what you intend to add to your pre and post deployment scripts.
Kind regards,
David Atkinson
Product Manager
Red Gate
Product Manager
Redgate Software
Table before update:
Table change:
Table after update:
Post deployment script:
This is a silly simple example, but could occur.
Sure, i could execute this after i executed the schema update script, but i want to handle the whole update in a transaction.
You're making a change that SQL Compare itself can't handle, as you're splitting a column and SQL Compare's script wouldn't have the knowledge to preserve your data.
There's good news and bad news.
The good news is that we can handle that via the addition of custom migration scripts. There's a video that describes how this works here:
http://www.red-gate.com/products/sql-de ... deployment (it's the second one, called "A step by step guide through database deployment).
The bad news is that due to various implementation details this functionality doesn't work with SQL Azure. How often do you find yourself in situations where you need to add pre/post statements to your scripts? I think you'll have to carry on modifying SQL Compare's script manually for the time being, and hopefully we'll handle this in a later release.
David
Product Manager
Redgate Software
thanks for the link to the video.
The migration script option is only available with the additional product "SQL Source Control 3.0" which we wont buy.
So we have to execute a custom pre/post deployment script and with this way we can handle the sql azure problem with ease.
Thanks!