Skip to content

[Bug]: Schema Compare - Multiple issues in Schema Compare #20025

@ClemJax

Description

@ClemJax

Description

Item 1 - Apply button not functional

In schema compare, I'm running a comparison of a database as source and a database project as destination. I'm having the same issue listed in #20019 where I'm unable to select anything in the window, but even beyond that, with everything selected, when I click the "Apply" button, nothing happens.

Expectations are what schema compare has always done for projects - changes in the source are applied to the destination. In this case, I expect the corresponding files to be updated in the project.

Item 2 - Any compare after the first run doesn't change source/destination.

In schema compare, I have run a compare as described above. I then go make a subsequent change - two examples here:
a. Going into Options and deselecting "Users" as an item to be included.
b. Updating a stored procedure file in the DB project.

In both cases, I make the change, and click compare. My expectation is that my changes would show up in the compare (either users not there, or a compare of the new proc code).

In reality, what is happening is that it is just running the same compare as before - not rebuilding the project for compare, not applying the options and still showing Users, etc. I have to completely close out and restart a compare to get any changes to pick up.

Steps to Reproduce

  1. Connect to source database
  2. Select a local database project sqlproj file as the destination.
  3. Ensure there's at least one difference between the two.
  4. Run Compare
  5. Try to select/deselect results in the comparison (doesn't work, this is Port "Fixing copyright header snippet." (#20990) #21009)
  6. Click "Apply" to apply the changes (doesn't work - no local files are updated)
  7. Select Options -> Included Object Types -> Uncheck an object type that is showing up as a difference
  8. Run Compare (doesn't work - compare shows results from prior run without considering the updates).

Affected Area

  • Connection dialog
  • Query results panel
  • Query editor
  • Object Explorer
  • Table Designer
  • Schema Compare
  • Schema Designer
  • Local container
  • GitHub Copilot integration
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the affected area

No response

Environment Information

VS Code version - 1.103.2
Extension version: 1.35.0
OS: Win 10
Connection Type - On Prem SQL Server 2022

Confirmation

  • I have searched existing issues and couldn't find a match
  • I want to work on this issue

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions