A mix task for generating an ERD (Entity-Relationship Diagram) in various formats for all Ecto schemas in your project.
Supported formats:
All diagrams are generated from the repository's sample schemas.
The package can be installed by adding ecto_erd to your list of dependencies
in mix.exs:
def deps do
[
{:ecto_erd, "~> 0.8", only: :dev}
]
endJust run:
mix ecto.gen.erdThe command above produces a DOT file, which you can convert to an image using the Graphviz utility:
dot -Tpng ecto_erd.dot -o erd.pngConfiguration is possible via the .ecto_erd.exs file.
The docs can be found at https://hexdocs.pm/ecto_erd.
Configuration examples and sample output can be found on the
Examples page.