Create Mermaid-Js ERD diagrams from existing tables.
- Supports PostgreSQL and MySQL
- Select from available schemas
- Select only the tables you are interested in
- Show only the constraints that you are interested in
- interactive cli (multiselect, search for tables and schemas, etc.)
Why would I need it / Why should I care?
Documenting stuff and keeping it updated is hard and tedious, but having the right documentation can help to make the right decisions. Mermerd was designed to be able to export an existing database schema in a format that can be used to prototype and plan new features based on the existing schema. The resulting output is an ERD diagram in Mermaid-Js format that can easily be updated and extended.
How does it work
- Specify the connection string (via parameter or interactive cli)
- Specify the schema that should be used (via parameter or interactive cli)
- Select the tables that you are interested in (multiselect, at least 1)
- Enjoy you current database schema in Mermaid-JS format
Some configurations can be set via command line parameters. The parameters can also be viewed via
|c||the connection string||
|ac||toggle if all constraints should be included (default false) 1||
Examples for connection strings:
How can I write/update Mermaid-JS diagrams?
- All information can be found here: Mermaid-JS
- I also recommend using an IDE with an Mermaid-JS extension, e.g. VS Code
- Unit tests
- Configurable suggestions for connection string input
}o--o|relation (currently displayed as
- Improve output file naming
If the flag
-acis provided, mermerd will print out all constraints of the selected tables, even when the resulting constraint is not in the list of selected tables. These tables do not have any column infos and are only present via their table name.