microsoft / microsoft/vscode-mssql
[Bug]: Schema compare failed: startIndex ('-1') must be a non-negative value.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 610
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 97
Description
### Description
Executed schema compare from DB to local sql project.
Expected to update local sql project after hitting "apply" but got the following error instead:
```
Apply schema compare changes: Failed.
startIndex ('-1') must be a non-negative value. (Parameter 'startIndex')
Actual value was -1. startIndex ('-1') must be a non-negative value. (Parameter 'startIndex') Actual value was -1.
```
### Steps to Reproduce
1. Started a schema compare
2. try to apply changes
3. Get error
### 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
* VS Code version:
```
Version: 1.106.3 (user setup)
Commit: bf9252a2fb45be6893dd8870c0bf37e2e1766d61
Date: 2025-11-25T22:28:18.024Z
Electron: 37.7.0
ElectronBuildId: 12781156
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100
```
* mssql version:
```
Identifier: ms-mssql.mssql
Version: 1.37.1
```
* Connection type:
* FROM:
* `Synapse serverless database`
* TO:
* `local sql project`
### 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.