steps:
- task: colinsalmcorner.colinsalmcorner-buildtasksbeta.dacpac-report-task.DacPacReport@1
displayName: 'DacPac Schema Compare MyDBProject.dacpac'
inputs:
# dropName: drop # name of the published artifact that contains the dacpac for the build: the dacpac is downloaded from this drop.
dacpacName: MyDBProject # name of the dacpac (without extension) to compare
targetDacPacPath: MyDBProject\bin\$(BuildConfiguration) # Path to dacpac in this build (to compare to output of previous build)
# extraArgs: '/Variables myvar=myvalue' # extra args for the compare - use to supply SQLCMD variables, for example.
# reverse: false # set to true to reverse source and target for compare
# userSqlPackagePath: '' # the sqlpackage.exe filepath - use this only if the default does not detect the path correctly
This task shows the schema changes of a DacPac between builds. The task adds two sections to the build summary:
- Schema Change Summary: A summary of changes from the last build.
- Change Script: The SQL-CMD script that would be generated if deploying from the newer dacpac model against the older model.
The task requires the following settings:
- Drop Name: The drop name of the build that contains the dacpac file. You must publish the dacpac for this task to work.
- DacPac Name: Name of the DacPac to analyze (without .dacpac extension).
- Compiled DacPac Path: Path to the DacPac file that this build will produce. Typically the
bin\$(BuildConfiguration)
path of the SSDT project.
You must enable Allow Scripts to Access OAuth Token
on the build Options. If you do not, you will see 403 errors.