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, and per-table statistics. Commit it, share it, CI it.
  • Lint before you ship. 21 convention rules catch naming violations, missing timestamps, serial vs identity, and more, all from the JSON file, no database connection needed.
  • Check before you migrate. Every DDL statement gets a lock type, rewrite risk, and safe alternative. Know whether ALTER TABLE will lock your busiest table before you find out in production.

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.