Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make DACPAC update only one schema?

I have a VS2013 solution with *.sqlproj project that contains objects specific to this solution. The issue is that this is database common also for other projects.

My problem is to automatically deploy changes within my schema to database without affecting other objects. By default DACPAC updates whole database that is not desired in my case.

I tried to write deployment contributor http://msdn.microsoft.com/en-us/library/dn268597(v=vs.103).aspx but it seems there is no way to have it within solution folder, as it have to be placed in Program Files subfolder of SQL server.

I use Bamboo to create deployment packages and the application is hosted on Microsoft Azure with Azure SQL database.

Is there any way I can deploy DB changes only within my schema using DACPAC or other automatic means?

like image 715
user3617544 Avatar asked May 08 '14 18:05

user3617544


1 Answers

You can build a deployment using the DacpacMerge library, this will merge the model from the database with the model for a single schema, into a new DacPac. This new generated Dacpac can be deployed without affecting the other objects, as they are the same as the database current definition.

like image 93
GrumpyBusted Avatar answered Oct 14 '22 23:10

GrumpyBusted