DrJohnT / AzureDevOpsExtensionsForSqlServer

Microsoft SQL Server deployment extensions for Azure DevOps Pipelines
MIT License
20 stars 14 forks source link

PublishDacPac Feature Request: Generate schema change script action #19

Open binte opened 4 years ago

binte commented 4 years ago

I am trying to allow a pipeline to publish a schema change to an on-premises SQL Server 2017 instance, but I want to do that in two steps:

I know that can be achieved by publishing to SQL Azure by setting deploymentAction: 'Script' and then deploymentAction: 'Publish'

Can this be done by using this extension? I have gone through the documentation, and it does not seem possible. If so, can you provide an example?

DrJohnT commented 3 years ago

The whole point of SSDT / DACPACs methodology is that they generate a SqlCmd script on-the fly depending upon the status of the target database. Personally, I let the tool do its job. However, I understand for some shops, they will want to see the change script. I will take a look at adding this feature request sometime in the future. If you fancy your hand, you could add it to the underlying PowerShell module PublishDacPac yourself and issue a pull request. https://github.com/DrJohnT/PublishDacPac