Radar / Ideas / SchemaGuard: catch code-database…

SchemaGuard: catch code-database mismatches before they hit production

weekly debate · 2026-W47moderateJEV confidence 0.52JEV monetization –2026-11-20
OutcomeTeams reduce schema-mismatch bugs (missing columns, wrong types) by catching them at PR review time, measured as reduction in production incidents tagged 'schema'.

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

A CI step that: (1) Graphify builds a knowledge graph of the codebase, extracting ORM model definitions and raw SQL column references, (2) a schema snapshot (exported from staging or a read-only replica) provides the ground truth, (3) a diff layer compares code-side column references against the snapshot, (4) Open Code Review annotates the PR with mismatch warnings at the relevant lines.

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

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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

Repo to start from

schemaguard - catch code-database mismatches at PR time using knowledge graphs and schema snapshots

Evidence

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.