Terraform for SQL Server, Postgres, and MySQL databases
π SchemaSmith v2.0 is live. State-based schema deployment for SQL Server, PostgreSQL, and MySQL β no migration scripts to author or order. Self-contained executables, no organization-size license caps. Read the v2.0 announcement Β· Get started Β· Release notes
SchemaSmith is a state-based database schema management toolset for SQL Server, PostgreSQL, and MySQL. Define your desired database state as metadata β tables, views, procedures, indexes, constraints, data β and SchemaSmith transforms any target server to match. Same toolset, same package format, three engines β no migration scripts to author or order.
Self-contained, single-file executables for Windows, Linux, and macOS. No .NET runtime install needed.
- SchemaTongs β Extracts databases into schema packages across all three platforms. Pure SQL extraction with no external SDKs, orphan detection with cleanup-script generation, post-extraction script validation, and subfolder preservation so your repository organization survives re-extraction.
- SchemaQuench β Deploys schema packages to SQL Server, PostgreSQL, and MySQL. 9 execution slots, conditional deployment via
ShouldApplyExpression, secondary-server fan-out, FK-aware data delivery, checkpoint/resume, WhatIf analysis, indexed views (SQL Server), materialized views (PostgreSQL), and a token system that reaches every script. - DataTongs β Extracts table data and generates platform-aware MERGE scripts for SQL Server, PostgreSQL, and MySQL. Auto primary-key detection, complex type support (geometry, hierarchyid, binary), and full token resolution including MySQL.
For the complete feature reference, see docs/FEATURE_LIST.md.
| OS | x64 | ARM64 |
|---|---|---|
| Windows | win-x64 | win-arm64 |
| Linux | linux-x64 | linux-arm64 |
| macOS | osx-x64 | osx-arm64 |
choco install schemasmithInstalls schemaquench, schematongs, and datatongs onto your PATH as a single combined package. Binaries are Authenticode-signed via Azure Trusted Signing β no SmartScreen warnings.
Download self-contained ZIP packages from the latest release. Extract and run β no .NET runtime required.
dotnet build SchemaSmith.slnFor self-contained publishing of the CLI tools:
# Windows
.\build-schemaquench.cmd
# Linux/macOS
./build-schemaquench.shPick a platform and run the matching run-demo script:
# SQL Server
cd Demos/SqlServer && ./run-demo.sh
# PostgreSQL
cd Demos/PostgreSQL && ./run-demo.sh
# MySQL
cd Demos/MySQL && ./run-demo.shEach script builds SchemaQuench from source (if not already built), starts a containerized database server, and deploys the AdventureWorks, Chinook, Northwind, and Sakila demo products. Use run-demo.cmd on Windows. Connection details for each platform live in the .env file inside the platform folder.
Integration tests run against all three platforms in parallel and expect database servers on these local ports:
| Platform | Host | Port |
|---|---|---|
| SQL Server | 127.0.0.1 | 1440 |
| PostgreSQL | 127.0.0.1 | 5432 |
| MySQL | 127.0.0.1 | 3306 |
The simplest way to bring all three up is to run the demo for each platform β the same containers serve as the integration-test backends:
cd Demos/SqlServer && ./run-demo.sh
cd Demos/PostgreSQL && ./run-demo.sh
cd Demos/MySQL && ./run-demo.shThen run tests:
dotnet test SchemaSmith.slnIntegration tests for a platform whose container isn't running will be skipped or fail β start only the platforms you need to exercise locally.
Four sample databases ship across all three platforms:
- AdventureWorks (71 tables) β Microsoft's reference OLTP schema
- Chinook β digital media store, common across DB tutorials
- Northwind (13 tables) β classic small-business sample
- Sakila β DVD rental store, originally a MySQL reference
See Demos/README.md for the per-platform layout, credentials, and SQL Server tutorials.
SchemaSmith Community Edition is licensed under SSCL v2.0. Use it freely to manage databases for your own products and services β SQL Server, PostgreSQL, or MySQL β with no restrictions on organization size, revenue, database size, or environment count. Not permitted: redistributing SchemaSmith as a standalone product, bundling it as a component of another product marketed to third parties, or offering it as a hosted or managed service. See the LICENSE for the full terms.
- End-User Documentation β guide chapters and reference docs
- Documentation Site β multi-platform documentation