Feature Request : Add Custom Code to Synchronisation Script
howarthcd
Posts: 70 Bronze 3
It would be nice to have the facility to add custom code into the generated synchronisation script, and for the code to be wrapped in the transaction and error handling
For instance, we use SQL Compare to generate a single database release script, but then add in code at the end for the manipulation of reference data, and a call to a stored proc to increment a stored database version number. This all has to be added manually once the synchronisation script has been created, and is often fiddly as we have to replicate the transaction and error handling.
It would be useful if SQL Compare could capture custom code and then incorporate it at the end of any auto-generated DDL statements, perhaps in a TRY/CATCH block to simplify error handling.
I appreciate that this could be performed using SQL Multi-Script, but we would prefer to have a single SQL script for the entire release.
Thanks
Chris
For instance, we use SQL Compare to generate a single database release script, but then add in code at the end for the manipulation of reference data, and a call to a stored proc to increment a stored database version number. This all has to be added manually once the synchronisation script has been created, and is often fiddly as we have to replicate the transaction and error handling.
It would be useful if SQL Compare could capture custom code and then incorporate it at the end of any auto-generated DDL statements, perhaps in a TRY/CATCH block to simplify error handling.
I appreciate that this could be performed using SQL Multi-Script, but we would prefer to have a single SQL script for the entire release.
Thanks
Chris
Comments
Would you want your post-deployment script to be placed just before the end of the transaction?
Can you confirm that there's nothing you need to put in your post-deployment script that isn't transactionable or needs to be put after the transaction?
Regards,
David Atkinson
Product Manager
Red Gate Software
Product Manager
Redgate Software
Hi David
Thanks for your reply.
We would need to add the code just before the end of the transaction - typically we would insert reference data into tables created earlier on in the script.
Currently there's nothing that we would want do in the proposed custom section that isn't 'transactionable', although I guess that the option to place the code inside or outside the transaction would be useful to some - maybe even providing two code entry points (one for inside the transaction, and one for outside the transaction) would offer more flexibility.
Regards
Chris
David
Product Manager
Redgate Software
No worries.
You mentioned that this is something that is already being considered - has an expected delivery date yet been decided?
Thanks
Chris
I suspect that the topic will come up a lot now that we've got SQL Source Control as an underlying platform to deploy from. I anticipate users will want to know how to deploy seamlessly from this in an automated fashion.
David
Product Manager
Redgate Software