Team City - SQL Change Automation (Build database)
GordonMPG
Posts: 11 Bronze 1
I have a SQL database project with tables and stored procs. We also have a Post Deployment script folder. But in this Post Deployment script folder we have scripts that developers use locally.
These post deploy scripts use the :r SQLCMD to run other scripts. This is showing up as invalid when I try to run the Change automation script in Team City:
I tried excluding the post deploy scripts from the sql project but it still tries to validate the script (because it's in the folder).
Is there anyway to ignore these scripts for change automation but keep it for my devs to continue their local work flow?
These post deploy scripts use the :r SQLCMD to run other scripts. This is showing up as invalid when I try to run the Change automation script in Team City:
[15:09:52][Step 1/2] Errors occurred whilst parsing file E:\TeamCity\buildagent\work\b9096a027bc7d001\Database.Root\Scripts\Post
[15:09:52][Step 1/2] Deploy\Script.PostDeploymentRoot.sql
[15:09:52][Step 1/2] '' at line 36, column 3
[15:09:52][Step 1/2] '' at line 43, column 6
[15:09:52][Step 1/2] '' at line 44, column 2
[15:09:52][Step 1/2] '' at line 0, column
I tried excluding the post deploy scripts from the sql project but it still tries to validate the script (because it's in the folder).
Is there anyway to ignore these scripts for change automation but keep it for my devs to continue their local work flow?
Tagged:
Answers
This help article explains how the process works:
https://documentation.red-gate.com/sca3/developing-databases-using-sql-change-automation/generating-deployment-scripts/include-scripts
To my knowledge there is not an option to ignore these scripts if you have added them to your project.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com