Skip to content

Commit 9137c07

Browse files
frectonzclaude
andcommitted
feat: add ERD endpoint for entity relationship diagrams
Add GET /api/erd endpoint that returns table schemas with column details (name, type, nullable, primary key) and foreign key relationships for rendering ERD diagrams in the UI. Implements erd() for all 7 database drivers: - SQLite/LibSQL: PRAGMA table_info and foreign_key_list - PostgreSQL: information_schema with table_constraints joins - MySQL: information_schema with column_key for PKs - DuckDB: information_schema with duckdb_constraints() - ClickHouse: system.columns (no FK support) - MSSQL: sys.columns/types/indexes with sys.foreign_keys Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8fcbdbf commit 9137c07

2 files changed

Lines changed: 634 additions & 3 deletions

File tree

0 commit comments

Comments
 (0)