-
No database
Replays your migrations against an in-memory model. Nothing to provision, seed or tear down in CI.
-
Pure Go, one binary
A hand-written DDL parser with no cgo and no third-party SQL library.
CGO_ENABLED=0just works. -
Deterministic
The same migrations always render the same document, which is what makes the
--checkCI gate possible. -
Built for CI
Ships as a GitHub Action: push regenerated docs, or fail the pull request when they're stale.
How it works¶
flowchart LR
A["migrations/*.sql"] --> B["Lexer"]
B --> C["DDL parser"]
C --> D[("In-memory schema")]
D --> E["Mermaid ERD + Markdown"]
Migrations are applied in order, so ALTER, RENAME and DROP behave like
they do in a real database: the diagram shows the schema as it exists after
the last migration. Statements the parser doesn't model (DML, DO blocks,
functions) are skipped, never fatal. See Parser for the details.
Quick start¶
See it in action
The live example is generated by stratum itself, from this repository's test migrations, every time the site deploys.
