Mermaid is Javascript diagramming and charting tool.
This VSCode extension converts MermaidJS Entity Relationship markdown to SQL.
.md, .mermaid and .mmd files are currently supported.
- Generate SQL code for MySQL, SQLite and Postgres (might work with other DBMS as well) from Mermaid markdown
- Composite primary and foreign key support
- Automatic Foreign key generation from relationships definition, without the need to define FK in ER diagram
- Most data types supported (SET and ENUM are not accepted by Mermaid)
Open a valid Mermaid ER diagram file, search the command palette for "Mermaid ERD to SQL". The generated file will be in the same folder as the converted file.
If the basic SQL does not work with your DBMS, you can try the specific Postgres, MySQL or SQLite commands.
See the Wiki on Github
See the Change log
Please feel free to open issues and suggest features or pull requests on Github
To edit and preview Mermaid mardown files, I personnaly use these extensions :