Ptah compares the schema you want with a live database and either writes versioned migrations or applies an approved plan. It also migrates persistent inference state, such as re-embedding a pgvector table. PostgreSQL, MySQL, MariaDB, SQLite and more. Open source, MIT, no toolchain to install.
Ptah builds the new generation beside the active one, calls your OpenAI-compatible embeddings endpoint, verifies, and switches queries over when you say so. It never produces a vector itself.
Works with the schemas you already have.
Every source parses into the same internal schema before planning. --schema-file and --root-dir repeat and mix freely; the merged result is the desired schema. No proprietary format is required.
--schema-file
SQL, YAML, HCL, DBML
--root-dir
Annotated Go structs
--schema-cmd
Any program that emits SQL, HCL or YAML — an ORM exporter
--db-url
A live database, introspected into Go models with ptah introspect
schema.sql · models/*.go · live db
│
↓
ptah validate → plan → lint → apply → drift
│
↓
database
Databases
PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, CockroachDB, YugabyteDB, ClickHouse, Oracle, Spanner. Coverage varies by engine. Support matrix →
Tooling
ptah is the product. ptah-ls gives editor support for Go annotations. GitHub Action, Go packages at go.5x5.cz/ptah.
Coming from Atlas
ptah-compat keeps Atlas-shaped commands while executing Ptah behavior. Independent clean-room implementation, not affiliated with Ariga. Atlas compatibility →