feat: Add ER diagram visualization for database schemas#1589
Open
jcjaskula-aws wants to merge 1 commit into
Open
feat: Add ER diagram visualization for database schemas#1589jcjaskula-aws wants to merge 1 commit into
jcjaskula-aws wants to merge 1 commit into
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: