DacFx icon indicating copy to clipboard operation
DacFx copied to clipboard

Visual Studio SQL Schema Compare - Targeting Split/Composite SQL Server Database Projects

Open emdempster opened this issue 10 months ago • 0 comments

Description of the issue In some databases, like vendor databases (ex: Dynamics GP company databases), customers are allowed to add new objects to the database, while leaving existing objects as they are. With Visual Studio SQL Server Database projects, a good pattern would be to put the vendor's code in one database project and the customizations in a second project that has a reference to the former.

image

During a schema comparison, when the 2nd project is the target, users are prompted to import objects that exist in the "vendor's" project. This is because the Schema Comparison functionality only examines the referenced project when the database is the target of the schema comparison.

image

The end result of this is having duplicate objects between the two projects, causing build errors. The user can remove those objects, but it is inefficient for the database developers.

image

Describe the solution you'd like When a project is a target of the comparison, the referenced project needs to be included in the comparison. If the referenced project is included in the comparison, then the objects in that project would not be shown as missing in the schema comparison.

Describe alternatives you've considered Objects from the referenced database can be ignored in the schema comparison. However, finding the objects that do need to be added to the referencing project can be more difficult, if there are hundreds or thousands of objects in the referenced database.

emdempster avatar Apr 12 '24 15:04 emdempster