Visual Studio SQL Schema Compare - Targeting Split/Composite SQL Server Database Projects
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 460
- Forks
- 29
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 7
Description
**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.

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.

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.

**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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Visual Studio SQL Server Database Projects schema comparison entry point and how a project target resolves referenced projects. Reproduce a comparison where the target project references a vendor project, then verify that objects from the referenced project are not reported as missing or imported into the target. Done means the comparison preserves the target project's custom objects without creating duplicate project objects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100