We have implemented DevOps for our, SQLServer based, database releases on Azure DevOps using MSBuild (to create the dacpac in the build pipeline) and sqlpackage.exe (for deploying the dacpacs).
The build pipeline results in two dacpacs (one for DatabaseOne and the other for DatabaseTwo) and we use sqlpackage to release the dacpacs.
We are facing a scenario where in a single change set
a. In DatabaseOne there is a change to a stored procedure, which references a new table in DatabaseTwo
b. We are creating the new table in DatabaseTwo
There is an error when deploying the changes because sequentially, DatabaseOne is deployed before DatabaseTwo. The deployment succeeds upon retry but we are looking for a solution that works in general.
Has anyone come across such an need?