Is there a way to generate a script of the changes being committed? We have a third-party developer who needs to reference our database changes, but has no access to our network; we would like to be able to provide the committed changes as an SQL script.
Comments
1 comment
-
1. Have you looked at using a SQL Change Automation project instead of a SQL Source Control project. It's migration script based, rather than disired state-based like SQL Source Control. It basically works exactly like that:
https://documentation.red-gate.com/sca/developing-databases
2. If you want to stick with SQL Source Control, you can set up an automated build task using the SQL Change Automation PowerShell cmd-lets:
https://documentation.red-gate.com/sca/reference/powershell-cmdlets
For example, if you created a new DatabaseReleaseArtifact for each commit, using the latest source control version as the source and the prod DB (or a copy of the prod DB) as the target, you could publish this release artifacts to a shared location.
That release artifact will contain:
- Copy of source schema
- Copy of Target schema- Update script
- Human readable diff report with any warnings etc
Add comment
Please sign in to leave a comment.