SSDT: Exclude/Filter objects from being published - by EdLawton

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 833818 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 3/14/2014 3:40:14 AM
Access Restriction Public


I have a need for a constraint on a table e.g. 

ALTER TABLE [dbo].[XXX]  WITH CHECK ADD  CONSTRAINT [CK_XXX_DateAddedRange] CHECK  (([DateAdded]>='2014-03-14'))

which gets updated in our production environment daily. This conflicts with out Source Control system and the publish script has an entry to put it back to a previous date.  If a filter could be included to remove specific objects from a comparison or publish (such as that offered by Redgate) I'd be able to keep Source Control in step with the real world, rather than one behind. 

Sign in to post a comment.
Posted by Patrick [MSFT] on 3/18/2014 at 3:29 PM
Hello EdLawton - This isn't something we'd do from publish however there are several workarounds. The most flexible one is for you to write a deployment plan modifier. See With a deployment plan modifier you can walk the AST for the deployment plan and make any modifications you want prior to it being deployed.