SchemaGuard: catch code-database mismatches before they hit production
The problem
Coding agents write code that assumes database columns exist, but they don't check the actual schema. Graphify understands code structure including ORM and query patterns; DBHub can query a database schema. Nobody wires them together to catch the gap.
The idea
Why now
Graphify shipped as a queryable knowledge graph with tree-sitter parsing. DBHub 2.0 hit 13-14x token efficiency making schema queries cheap. Open Code Review passed 50k stars with line-level comment support. All three are production-ready this week.
What it combines
Graphify extracts what the code expects from the database (ORM models, raw SQL). DBHub provides the schema snapshot from a read-only source. Open Code Review delivers the finding to the developer at the right line. Without all three, you either can't extract assumptions, can't check reality safely, or can't surface the finding.
How to build it
- Export schema snapshot via DBHub. Connect to a read-only staging replica via DBHub MCP, dump table and column names into a JSON manifest. No write access needed. (0.5 day)
- Extract raw SQL column references via Graphify. Use Graphify's knowledge graph to find all explicit column references in raw SQL strings. Limit v1 to raw SQL only. (1 day)
- Diff and report mismatches. Compare the two sets, output a list of columns referenced in code but absent in schema snapshot (and vice versa). (0.5 day)
- Wire into Open Code Review for annotation. Format mismatches as line-level comments and pass them to Open Code Review for PR annotation. (1 day)
- Package as GitHub Action. Docker action triggered on PRs that touch migration files or SQL-containing files. Uses a committed schema snapshot, no live DB in CI. (1 day)
Who benefits
- Backend engineering teams using coding agents
- Catch schema bugs at PR time instead of in production
- DBAs and platform teams
- Visibility into schema drift without manual audits or live DB access in CI
How it makes money
- Model
- Open-source CLI + paid GitHub App with dashboard
- Pricing
- Free for public repos; $79/mo per private repo for drift detection and Slack alerts
- Wedge
- Teams already using DBHub or Bytebase who see schema bugs in production
- Channels
- GitHub Marketplace · Bytebase community · PostgreSQL Slack
Distribution
B2B: engineering teams with PostgreSQL/MySQL and active agent-assisted development. Wedge: free GitHub Action that comments on PRs; paid tier for scheduled drift detection and Slack alerts.
Why it wins
Existing schema linters (squawk, atlas) check migration files only. This checks application code against a schema snapshot, catching ORM misuse, raw SQL drift, and missing migrations that linters miss. Graphify's graph-based extraction handles ORM patterns that regex cannot.
Risks
Biggest risk: Graphify's extraction of column references from ORM code may be inaccurate. MVP de-risks by limiting v1 to explicit raw SQL references only, which are unambiguous, and adding ORM analysis only after validating extraction accuracy.
Strongest objection left standing
Graphify's tree-sitter extraction of column references from ORM code is unvalidated; if it only handles raw SQL reliably, the tool misses the most common agent-generated code patterns (ORM calls), limiting its value to a narrow subset of bugs.
Build it with
- Graphify: turn any codebase into a knowledge graph your agent queriesExtracts code structure including raw SQL and ORM column references into a queryable graph
- DBHub 2.0: Bytebase's token-efficient MCP server for every major databaseProvides token-efficient schema export from a read-only replica or staging database
- Open Code Review: Alibaba's hybrid AI code reviewer, now past 50,000 starsDelivers line-level review comments on PRs with the mismatch findings
Repo to start from
schemaguard - catch code-database mismatches at PR time using knowledge graphs and schema snapshots
Evidence
- Graphify: codebase knowledge graph
- DBHub 2.0: token-efficient MCP for databases
- Open Code Review: Alibaba's hybrid AI reviewer
Debated by openai/gpt-6-sol, anthropic/claude-sonnet-5.5, qwen/qwen3.8-max-0902, moonshotai/kimi-k2.5. Judged by JEV.
Get the week's best AI launches, plus 3 ideas worth building
One email every Saturday. Ranked by traction, not hype. Free.