microsoft / microsoft/vscode-mssql
[Bug]: Schema compare doesn't show the expected changes
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 610
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 97
Description
### Description
When I am doing an schema compare of a table i expect the differences to be shown only for the thing I've changed.
When doing a column update to a table with constrains to another table I see that the schema compare creates diff report in the create table section as if the constrains are to be removed.
The constrains are in reality added as ALTER TABLE in the [table].sql but doesn't show up in the schema compare.
This makes you think you've removed the constrains since they show up as removed in the create table diff instead to the right.
### Steps to Reproduce
1. Create two tables where one of the tables has a FK constrain to the 2:nd table.
2. Build a database for a 2019 MSSQL target
3. Import .dacpac or publish dacpac to your local SERVER
4. Add manually a new column to the table in SQL Project and rebuild the project.
5. Make a schema comparision to your local database replicated and expect the column to be the only difference.
### Affected Area
- [ ] Connection dialog (SQL Server | Azure browse/Fabric browse)
- [ ] Query editor
- [ ] Query results panel
- [ ] Object Explorer
- [ ] GitHub Copilot integration
- [ ] Preview/Edit data
- [ ] Table Designer
- [ ] Schema Designer
- [x] Schema Compare
- [ ] Local SQL Server Container provisioning
- [ ] SQL database in Fabric provisioning
- [ ] DACPAC/BACPAC export/import
- [ ] SQL Database projects
- [ ] Query Plan Visualizer
- [ ] Other (please describe below)
### If you selected "Other", please describe the affected area
_No response_
### Environment Information
Version: 1.113.0 (user setup)
Date: 2026-03-24T15:07:18+01:00
Electron: 39.8.3
ElectronBuildId: 13620978
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26100
### Confirmation
- [x] I have searched existing issues and couldn't find a match
- [ ] I want to work on this issue
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.