SchemaSmith Tool

SchemaTongs — Cast Your Database Into Code

SchemaTongs grips your live database and casts it into a structured schema package — JSON for tables, SQL for programmable objects — ready for version control and the complement to SchemaQuench's deployment cycle.

Try it hands-on
SchemaTongs extracting a live database into JSON and SQL schema files

What SchemaTongs does

SchemaTongs connects to a live database, reads every enabled object type, and writes the results to your configured path as a schema package. Tables become JSON files describing columns, indexes, and constraints. Views, stored procedures, functions, and triggers become plain SQL files. Everything is organized in a folder structure ready for source control — the same structure that SchemaQuench consumes to apply schemas to fresh targets.

The process is straightforward: SchemaTongs connects to your database, enumerates all enabled objects according to your ShouldCast flags, and writes them to disk. On first run, it creates the full package structure. On subsequent runs, it updates existing files in place and preserves any custom metadata you've attached under the Extensions section — this is round-trip-safe extraction. You can quench a schema to a new database, modify the package files in version control, extract from the modified database again, and the extensions you added stay intact.

One SchemaTongs executable runs on three platforms: SQL Server, PostgreSQL, and MySQL. The tool works identically on all three; what changes is the adapter underneath. Set your Platform value to SqlServer, PostgreSQL, or MySQL and SchemaTongs picks the right connection protocol, platform metadata APIs, and object-enumeration logic.

Important: one tool, three package types

A schema package extracted from a SQL Server database is a SQL Server package, not a universal one. Extract SQL Server and you get tables with SQL-Server-specific metadata, plus Catalogs, StopLists, DDLTriggers, XMLSchemaCollections, and IndexedViews. Extract PostgreSQL and you get Sequences, DomainTypes, EnumTypes, CompositeTypes, and MaterializedViews. Extract MySQL and Engine (storage engine) and Collation are captured per table. The mental model is universal; the packages themselves are platform-native.

Jump to the reference for your platform

Each platform reference covers configuration, ShouldCast flags, and the platform-native object types SchemaTongs captures for that engine.

SQL Server

Reference for SchemaTongs on SQL Server. Configuration, ShouldCast flags including Catalogs, StopLists, DDLTriggers, XMLSchemaCollections, and IndexedViews, and SQL Server package structure.

PostgreSQL

Reference for SchemaTongs on PostgreSQL. Configuration, ShouldCast flags including DomainTypes, EnumTypes, CompositeTypes, Sequences, and MaterializedViews, and how PostgreSQL-native objects land in the package.

MySQL

Reference for SchemaTongs on MySQL. Configuration, how Engine (storage engine) and Collation are captured per table in JSON, ShouldCast flags, and MySQL-native extraction.

Try it hands-on

Each platform has a 15-minute hands-on walkthrough focused on extraction. You'll configure a connection, run SchemaTongs against a live demo database, and review the generated Product.json and the extracted schema files.

SQL Server Walkthrough

Hands-on 15-minute walkthrough using the Northwind and Chinook demo databases. Configure the connection, extract the SQL Server schema, and review Product.json and the generated files.

PostgreSQL Walkthrough

Hands-on 15-minute walkthrough using the Northwind and Sakila demo databases. Configure the connection, extract the PostgreSQL schema, and inspect how PostgreSQL-native objects land in the package.

MySQL Walkthrough

Hands-on 15-minute walkthrough using the Northwind and Chinook demo databases. Configure the connection, extract the MySQL schema, and review how Engine and Collation appear per table in the package.