feat: Add ER diagram visualization for database schemas#1589
feat: Add ER diagram visualization for database schemas#1589jcjaskula-aws wants to merge 2 commits into
Conversation
|
@jcjaskula-aws thanks for this contribution. I allowed the workflows to run but they both failed. Please investigate. |
4a098fc to
80234d8
Compare
Pushed a commit for this: The ER diagram feature introduced react-flow-renderer which transitively pulls in @types/d3-dispatch@3.0.6+. This version uses const type parameters, incompatible with TS 4.8. The fix pins Not sure I like this fix. The feature of this MR is nice but this is not something critical (like the other AWS IAM MR which would make my life much easier). I'd say that if you have time and are willing to test, you could pull/build and play. If you feel it is a good addition, we could work on the implementation and review. Right now, the code changes are significant and it would take some efforts from many people to get it merged. |
80234d8 to
e9f4b0e
Compare
|
Please update from dev to get the #1602 fix onto this branch. |
- Right-click a schema node → "Show ER Diagram" opens an interactive React Flow-based diagram showing tables, columns, PK/FK markers, and foreign key relationships with column-level connections - Dagre layout engine for automatic positioning that minimizes edge crossings - Per-table color coding with colored relationship edges - Focus mode: click a table or use the search field to highlight it and its connected tables, dimming everything else - Foreign key queries added for PostgreSQL, MySQL, MSSQL, and SQLite - Fixed pre-existing PG driver notice listener leak
Pin @types/d3-dispatch to 3.0.5 to avoid const type parameter syntax incompatible with TS 4.8. Add skipLibCheck to base-driver and formatter tsconfigs to prevent DOM type errors from other hoisted @types/d3-* packages introduced by react-flow-renderer.
bd542c4 to
d40d7d7
Compare
ER Diagram Visualization for Database Schemas
This PR adds an interactive Entity-Relationship diagram feature to SQLTools. Right-click any schema node in the connection explorer and select "Show ER Diagram" to visualize tables, columns, and foreign key relationships.
Features
Bug fix
noticehandlers accumulated on pooled clients across queriesChanges across packages
NSDatabase.IForeignKeyinterface,fetchForeignKeysquery builder,getERDiagramDatadriver methodgetERDiagramDatainAbstractDriverfetchForeignKeysSQL queriesGetERDiagramDataRequesthandler,Connection.getERDiagramDatadelegationHow to test
Notes
I meant to write something that would solve #1304 but it is still lacking editing. Totally fine if a solution based on erd-editor is preferred.
Thank you for your contribution! Before submitting this PR, please make sure: