Skip to content

Conversation

@JCofman
Copy link

@JCofman JCofman commented Aug 15, 2025

Hi 👋,

Thanks a lot for this great extension! I really like the concept and the idea of using diffs via VS Code. I've added support for MSSQL databases. I've already tested it in production and haven't found any major issues. Since I needed to authenticate via both Windows Auth and username/password, I also had to implement the msnode sqlv8 driver in addition to mssql.
It's working for now, but I haven't fully battle-tested it yet 🙈.

Feel free to add any suggestions!

@JCofman JCofman force-pushed the feat/add-mssql-support branch from cfc33a6 to dbf182e Compare August 28, 2025 06:36
@JCofman JCofman marked this pull request as ready for review August 28, 2025 06:37
Copilot AI review requested due to automatic review settings August 28, 2025 06:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds MSSQL database support to the extension, enabling database migration operations for both Windows Authentication and username/password authentication on SQL Server databases. The implementation includes a new provider architecture for database abstraction and specific handling for MSSQL-specific features like IDENTITY_INSERT.

Key changes include:

  • Implementation of database provider pattern with PostgreSQL and MSSQL providers
  • Added MSSQL-specific query generation with proper identifier escaping and value handling
  • Enhanced migration logic with IDENTITY_INSERT handling and boolean literal normalization for MSSQL

Reviewed Changes

Copilot reviewed 19 out of 22 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/utils/utils.ts Updated type definitions and database info generation to support multiple database types
src/utils/types.ts Added common query result interface for database abstraction
src/utils/query.ts Enhanced query builders with database-specific SQL generation and identifier escaping
src/utils/database/*.ts New database provider architecture with PostgreSQL and MSSQL implementations
src/commands/migrateDataAsync.ts Added MSSQL migration logic with IDENTITY_INSERT handling and boolean normalization
src/commands/actions/*.ts Updated to use new database provider pattern instead of direct PostgreSQL client
package.json Added MSSQL dependencies (mssql, msnodesqlv8, @types/mssql)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@BryanAldrich
Copy link

I'm interested in using this, but when I try to build the PR it fails. I've never built a vs code extension before, but it complains about the sqlserver.node file.
X [ERROR] No loader is configured for ".node" files: node_modules/msnodesqlv8/build/Release/sqlserver.node
I'm happy to either learn how to fix, or if you want to provide a prebuilt, that'd be awesome.

@JCofman
Copy link
Author

JCofman commented Oct 8, 2025

@BryanAldrich yes you are right I did only test it via the build in debugger in VSCode. I have now added the correct configuration to build the extension for native clients. But since mssql package cannot run in a webworker this extension can only be build for native VSCode clients now. 🥲

@BryanAldrich
Copy link

BryanAldrich commented Oct 14, 2025

data-sync-1.0.31.vsix.zip

(for those interested).
and myself, because i can't actually build this on my work machine because for some reason, npm is blocked.

It isn't working, none of the UI buttons work and throw errors.

@BryanAldrich
Copy link

Error running command data-sync.import-analyze-data: command 'data-sync.import-analyze-data' not found. This is likely caused by the extension that contributes data-sync.import-analyze-data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants