Generate ER diagrams from database schemas. Creates Mermaid, PlantUML, or ASCII diagrams.
Generates ER diagrams from database schemas in Mermaid, PlantUML, or ASCII formats.
/plugin marketplace add deepaktiwari09/dt-workspace-plugin/plugin install dt-workspace@dt-workspace-marketplace[--format <mermaid|plantuml|ascii>] [--platform <platform>] [--module <module>]Generate Entity-Relationship diagrams from database schema documentation.
Read .dt-workspace config and validate generatedPaths exists.
If arguments provided, use them. Otherwise, use AskUserQuestion:
If --format provided, use it. Otherwise, ask:
For each selected module:
database-schema.mdMermaid Format:
erDiagram
USER {
uuid id PK
string email UK
string password_hash
timestamp created_at
}
ORDER {
uuid id PK
uuid user_id FK
decimal total
string status
}
USER ||--o{ ORDER : places
PlantUML Format:
@startuml
entity User {
* id : UUID <<PK>>
--
* email : VARCHAR(255) <<UK>>
* password_hash : VARCHAR(255)
created_at : TIMESTAMP
}
entity Order {
* id : UUID <<PK>>
--
* user_id : UUID <<FK>>
* total : DECIMAL
status : VARCHAR(50)
}
User ||--o{ Order
@enduml
ASCII Format:
+----------------+ +----------------+
| USER | | ORDER |
+----------------+ +----------------+
| id (PK) |<----->| id (PK) |
| email (UK) | | user_id (FK) |
| password_hash | | total |
| created_at | | status |
+----------------+ +----------------+
Create diagram file:
<module>/er-diagram.md (contains diagram code block)database-schema.mdER DIAGRAM GENERATED
Format: <format>
Module: <module>
Output: <path>/er-diagram.md
Tables: X
Relationships: Y
To view:
- Mermaid: Render in GitHub/GitLab or mermaid.live
- PlantUML: Use plantuml.com or IDE plugin
- ASCII: View directly in any text editor
To convert between formats, specify source and target:
/dt-workspace:diagram --convert --from mermaid --to plantuml
Reads existing diagram and converts to new format.