I have a Microsoft SQL Server database project with hundreds of objects (tables, procedures, etc). The resulting database is used in two contexts though -- some customers get a database with all the objects, but some customers' databases contain only a subset of the objects. About 75% of them.
Is there a way to mark each object in the database project in such a way I can say whether it should be deployed or not based on a toggle of some sort?
I thought of a few options:
I think #3 and #4 sound doable, but I'm still hoping there is a simpler, more maintainable solution.
It looks like the proper way to do this is to create a second database project that references the first.
Database A will have all the common objects, and Database B will have a reference to Database A (References -> Add database reference). I can ship database A as a "reduced" database, or database B as a "full" database.
Still working on it, but it seems to be the cleanest and proper way of doing what I want.
There is a good reference here from Microsoft, specifically creating a "composite project". https://msdn.microsoft.com/en-us/library/jj684584(v=vs.103).aspx