fuelen / ecto_erd

A mix task for generating Entity Relationship Diagram from Ecto schemas available in your project.
Apache License 2.0
215 stars 15 forks source link

Support Mermaid #15

Closed fuelen closed 2 years ago

fuelen commented 2 years ago

https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/ https://mermaid-js.github.io/mermaid/#/classDiagram

cw789 commented 2 years ago

Just had the same idea. But there seems to be an additional experimental ERD syntax in mermaid. -> https://mermaid-js.github.io/mermaid/#/entityRelationshipDiagram

fuelen commented 2 years ago

@cw789 yes, good note. I thought ERD syntax doesn't support fields, because they are not shown on the main page, but seems like I was wrong :)

cw789 commented 2 years ago

They do - but there are some limitations.

The type and name values must begin with an alphabetic character and may contain digits, hyphens or underscores. Other than that, there are no restrictions, and there is no implicit set of valid data types.

fuelen commented 2 years ago

Anyway, the biggest blocker for this feature is how ERD is rendered in examples by the link above image

fuelen commented 2 years ago

Seems like rendering is fixed зображення