DB schema migrations you can trust your agent to write.
Migratrom turns schema changes into typed, self-verifying operations for PostgreSQL and SQLite. Write migrations in your application language, prove each change, and keep applied history tamper-evident.
Why Migratrom? #
Typed, not textual
Schema changes are typed values in your language, not SQL files with hand-written up/down scripts. Refactor and review them like any other code.
Idempotent by construction
Every operation carries a postcheck: a boolean SQL probe that proves whether the change already exists. Re-running a migration batch is always safe.
Tamper-evident history
A SHA-256 checksum is stored with each applied migration. Editing the body of an already-applied migration is rejected with no silent drift.
DAG ordering
Migrations form a parent/child graph. The engine validates the graph and applies pending migrations in dependency order.
Multi-runtime
JavaScript supports Bun, Node, and Deno. Swift supports Swift 6.2+ with PostgresNIO or SQift. Same concepts, idiomatic implementations.
Multi-dialect
PostgreSQL and SQLite ship built in. Dialect selection is always explicit, so you always know which SQL you're generating.
Install #
JavaScript / TypeScript
bun add migratrom
npm install migratrom
Swift - add to Package.swift
:
.package(url: "https://github.com/migratrom/migratrom.swift", from: "0.1.0")