You have a GitHub Actions workflow that builds and deploys an Azure SQL database. The schema is stored in a GitHub repository as an SDK-style SQL database project.
Following a code review, you discover that you need to generate a report that shows whether the production schema has diverged from the model in source control.
Which action should you add to the pipeline?
Microsoft documents that DriftReport creates an XML report showing changes that have been made to the registered database since it was last registered. That is the action intended to detect whether the production schema has diverged from the expected model baseline in your deployment workflow.
This is different from DeployReport, which shows the changes that would be made by a publish action. In other words:
DriftReport answers: Has the deployed database drifted from the registered state/model?
DeployReport answers: What changes would be applied if I published now?
The other options are not the right fit:
Extract creates a DACPAC from an existing database, not a drift analysis report.
Script generates a deployment script, not a schema-drift report.
So to generate a report that shows whether production has diverged from the model in source control, add:
SqlPackage.exe /Action:DriftReport
Currently there are no comments in this discussion, be the first to comment!