Dacpac should not throw extra columns

I happily wrote a product that uses, the Sql Server Database Project and life were good, until we found a problem during the upgrade.

While we create tables, stored procedures, and various other database artifacts, after deployment to clients, they can add their own columns to the tables created by our dacpac.

We use DacFx for deployment (Microsoft.SqlServer.Dac), and we also provide raw dacpac for clients who insist on deploying their DBA.

Although the problem may still be present when using SSMS or similar tools, I am sure that with the “right” code, we must somehow prevent this when deploying through code.

Has anyone had the same problems and possibly found a solution?

Refresh, add a screenshot for deployment options. As you can see in the image, the option "Drop objects entirely, but not in the project" is already disabled.

DeploymentOptions

+4
source share
2 answers

I love this statement, “I happily wrote a product that uses the Sql Server Database Project, and life was good” haha!

You can write a deployment contributor that searches for new columns and removes the transition step from the process.

You can write your own or I have one that should do this ( http://agilesqlclub.codeplex.com/ ), if you use mine, then this will probably work for you:

/: AdditionalDeploymentContributorArguments = "SqlPackageFilter = KeepType (.. * *)"

, ( codeplex) http://blogs.msdn.com/b/ssdt/archive/2013/12/23/dacfx-public-model-tutorial.asp " 2: ".

Ed

+2

"DropObjectsNotInSource", , ( (, -).

" " , , .

0

All Articles