Why dryrun?

AI coding assistants write SQL blind. They don't know your schema, your indexes, or your constraints, so they generate migrations that take ACCESS EXCLUSIVE locks on busy tables, add varchar(255) columns when you use text, or create indexes that already exist.

dryrun makes your database schema portable:

  • Capture once, use everywhere. One dump-schema command produces a JSON file that contains your tables, columns, indexes, constraints, functions, enums, RLS policies, triggers, extensions, and per-table statistics. Commit it, share it, CI it.
  • Lint before you ship. 33 rules (19 convention + 14 audit) catch naming violations, missing timestamps, serial vs identity, duplicate indexes, circular FKs, and more, all from the JSON file, no database connection needed.
  • Check before you migrate. Every DDL statement gets a lock type, rewrite risk, safe alternative, and rollback DDL. Version-aware: knows which operations are safe on your PostgreSQL version.

Use Cases

AI-assisted database development

Install dryrun as an MCP server and your AI assistant gains full schema awareness. It stops hallucinating column names, suggests proper indexes, and warns you when a migration will rewrite the table.

Pre-deploy migration review

The check_migration MCP tool analyzes every DDL statement for lock types and rewrite risks. Wire it into your AI-assisted workflow or CI pipeline.

Schema governance across teams

Enforce naming conventions, require timestamps, ban varchar in favor of text, and flag tables without primary keys. One dryrun.toml config keeps the whole team aligned.