A modern, cross-platform SQL Server schema comparison and deployment tool built with Tauri (Rust) + React. Think Redgate SQL Compare, but open-source and works on Mac/Linux/Windows.
- Schema Comparison: Compare two SQL Server databases and see all differences
- Supported Objects: Tables, columns, indexes, primary keys, foreign keys, unique constraints, check constraints, default constraints, views, stored procedures, functions, and triggers
- Side-by-Side Diff View: Monaco Editor-powered diff view for comparing object definitions
- Script Generation: Generate deployment T-SQL scripts with proper dependency ordering
- Safe Deployment: Transactions, error handling, and rollback support
- Breaking Change Detection: Visual indicators for potentially breaking changes
- Framework: Tauri 2.x (Rust backend, ~10-15MB app)
- Frontend: React 19 + TypeScript + Vite
- Styling: TailwindCSS 4 + shadcn-inspired components
- State: Zustand
- Diff UI: Monaco Editor (side-by-side)
- SQL Server: tiberius crate (Rust)
- Dependency Graph: petgraph crate
# Install dependencies
pnpm install
# Run development server
pnpm tauri dev# Build for production
pnpm tauri buildThe built application will be in src-tauri/target/release/bundle/.
- Connect to Databases: Enter connection details for your source (what you want) and target (what you have) databases
- Compare: Click "Compare Schemas" to analyze differences
- Review: Browse the diff tree, select/deselect changes to deploy
- Generate Script: Generate a T-SQL deployment script
- Deploy: Execute the script directly or download for manual execution
schema-sync/
├── src-tauri/ # Rust backend
│ ├── src/
│ │ ├── commands/ # Tauri IPC handlers
│ │ ├── db/ # Database connection layer
│ │ ├── schema/ # Schema extraction
│ │ ├── compare/ # Comparison engine
│ │ ├── script/ # Script generation
│ │ └── deploy/ # Deployment execution
├── src/ # React frontend
│ ├── components/
│ │ ├── ui/ # Base UI components
│ │ ├── connection/ # Connection forms
│ │ ├── comparison/ # Diff tree and editor
│ │ ├── script/ # Script preview
│ │ └── deployment/ # Progress UI
│ ├── stores/ # Zustand stores
│ └── types/ # TypeScript types
Supports multiple authentication methods:
- SQL Server Authentication (username/password)
- Windows Authentication (Windows only)
- Azure Active Directory (token-based)
The script generator ensures objects are modified in the correct order:
- Drop triggers
- Drop foreign keys
- Drop check/default constraints
- Drop indexes
- Drop primary keys
- Modify columns
- Create/drop tables
- Create primary keys
- Create indexes
- Create constraints
- Create foreign keys
- Create triggers
Download the latest release for your platform from the Releases page.
See Getting Started above.
By default, the cdc (Change Data Capture) schema is excluded from comparison. You can configure additional schemas to exclude using the "Exclude Schemas" button in the UI.
SchemaSync handles Azure SQL's auto-generated constraint names (like PK__TableName__ABC123) by comparing constraints structurally rather than by name. This means:
- Primary keys are matched by columns and clustering
- Foreign keys are matched by columns and referenced table/columns
- Indexes are matched by columns, included columns, uniqueness, and clustering
- Unique constraints are matched by columns and clustering
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Saved connections with encryption
- Comparison history
- Rollback script generation
- Data comparison (not just schema)
- PostgreSQL support
- MySQL support
- Column mapping for renames
- Built with Tauri
- UI components inspired by shadcn/ui
- SQL Server connectivity via tiberius
- Diff visualization with Monaco Editor
MIT License - see LICENSE for details.