SSDT How to: Deploy .dacpac ignoring drop columns on target

六月ゝ 毕业季﹏ 提交于 2019-12-11 06:21:59

问题


I'm using the Database project in Visual Studio.

In my scenario I have customers who intuitively customize the database I provide for them, e.g. adding some columns in existing tables, adding new tables...

How can I make when deploying .dacpac these objects that are not part of my schema are not excluded?

Important:

Set DropObjectsNotInSource=FALSE is not working for table columns.

EDIT

Ed, please see if I am doing something wrong:

using (DacPackage dacPackage = DacPackage.Load(DacPacFileName))
{
     var dacServices = new DacServices(ConnectionString);

     var dacOptions = new DacDeployOptions
     {
         AdditionalDeploymentContributorArguments = "SqlPackageFilter=KeepTableColumns(*)"
     };

     dacServices.Deploy(dacPackage, NomeBancoDados, true, dacOptions);
}

Is '*' in table filter "ALL TABLES" ?

I tried a table name too, but it did not work.


回答1:


I wrote this for this scenario:

https://agilesqlclub.codeplex.com

You can "Keep" which deploys objects if they do not exist but does not deploy if there are changes or "Ignore" to completely ignore.

You can do this on type or name (regex)

Ed



来源:https://stackoverflow.com/questions/38150625/ssdt-how-to-deploy-dacpac-ignoring-drop-columns-on-target

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!