Home Dashboard Directory Help
Search

SSDT: Exclude/Filter objects from being published by EdLawton


Status: 

Active


3
0
Sign in
to vote
Type: Suggestion
ID: 833818
Opened: 3/14/2014 3:40:14 AM
Access Restriction: Public
0
Workaround(s)
view

Description

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.

Thanks
Details
Sign in to post a comment.
Posted by Microsoft 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 http://dacsamples.codeplex.com/. 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.
Sign in to post a workaround.