schema_graph
Maps SQLite table relationships through foreign keys, reports load order and circular references, and detects unindexed foreign-key columns plus orphan rows in sampled data.
Instructions
Show how tables relate through foreign keys: every child -> parent edge, tables with no relationships, a parents-first load order and circular references. Also reports foreign-key columns that have no index (with a CREATE INDEX suggestion as text) and checks for orphan rows (child rows whose parent does not exist) over a sample, even when PRAGMA foreign_keys is off.
format: "text" (default) or "mermaid" (an erDiagram you can paste into a renderer). orphan_sample: child rows to sample per foreign key (100-100000).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| format | No | text | |
| orphan_sample | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |