fuelen/ecto_erd
60.2
Adequate · 18 September 2026
2.1k
lines of production code
Elixir
primary language
1
measurement over time
What this system is
This system is a library and CLI tool that generates Entity-Relationship Diagrams from Ecto schemas. It supports multiple output formats including DOT, PlantUML, Mermaid, D2, DBML, and QuickDBD, allowing developers to visualize database structures in their preferred syntax. The tool provides configuration options for controlling enum value display and handles edge cases like missing modules or empty schemas gracefully.
Features
Expanded output format support and updated documentation
The tool now generates Entity-Relationship Diagrams in multiple formats beyond the default DOT, specifically adding support for PlantUML, DBML, QuickDBD, Mermaid, and D2. The README has been updated to reflect these new capabilities, showing example images for each format and clarifying that the default DOT output can be converted to images using Graphviz. Additionally, the internal examples generator script has been removed, likely replaced by local fixtures as indicated by the commit history, and the formatter configuration has been updated to include new directories.
(repo-wide) · high confidence
New D2, DBML, and Mermaid output formats added alongside DOT refactoring
Users can now generate Entity Relationship Diagrams in D2, DBML, and Mermaid formats in addition to the existing PlantUML and DOT outputs. The new D2 renderer uses the ELK layout engine for orthogonal edge routing and supports node clustering. The DBML renderer introduces support for enum definitions and primary key indicators. The Mermaid renderer adds support for field comments and restricts column customization to either showing default fields or hiding them entirely. The existing DOT renderer has been refactored to implement the Document behavior, now supports primary key indicators in table labels, and handles schemas with no fields gracefully.
lib/ecto/erd/document · high confidence
Support for multiple ERD output formats and enum configuration
The \mix ecto.gen.erd\ task now generates Entity Relationship Diagrams in PlantUML, DBML, QuickDBD, Mermaid, and D2 formats in addition to the existing DOT output. Users can select the desired format via the \--output-path\ file extension. The task also introduces \:enum\_values\_limit\ and \:enum\_values\_order\ configuration options to control how \Ecto.Enum\ field values are displayed and sorted in the generated diagrams.
lib/mix · high confidence
Behavioural changes
ERD generation refactored with new output formats and enum controls
The library has been restructured to support multiple ERD output formats (D2, DBML, Dot, Mermaid, PlantUML, QuickDBD) via a new \Ecto.ERD.Graph\ and \Ecto.ERD.Document\ architecture. Users can now control enum value rendering in the output using the \:enum\_values\_order\ and \:enum\_values\_limit\ options, which allow sorting and truncating the list of enum values displayed. Additionally, the system now warns instead of crashing when \belongs\_to\ or \embeds\ associations reference modules that are not Ecto schemas, and schema scanning now safely handles applications that fail to load their module lists.
lib/ecto/erd · high confidence
Replace legacy examples with local fixtures
The example generation pipeline now uses local Ecto schema definitions (in dev/example\_schemas.ex) as the source of truth, replacing the previous external or legacy sources. This change introduces a new ExamplesGenerator that renders these schemas into multiple diagram formats (D2, DBML, DOT, Mermaid, PlantUML, QuickDBD) and updates the generated example files in the examples/sample\_app directory to reflect the current data model, including accounts, billing, and content contexts.
dev, examples · high confidence
Test coverage
Added tests for ERD output formats and enum handling
Added test coverage for the Ecto ERD library, including a new test file to verify that committed example documents match local schemas. Updated existing tests to cover the new DBML and D2 output formats, verify primary key indicators in DOT output, and validate the new \enum\_values\_order\ and \enum\_values\_limit\ options across DOT, D2, PlantUML, and QuickDBD renderers.
test · high confidence
Dependencies
Upgrade Ecto dependency to 3.12+ and update dev tooling
The project now requires Ecto \~\> 3.12, dropping support for legacy types and aligning with recent Ecto changes. Additionally, the dev dependency ex\_doc has been upgraded (from \~\> 0.24 to the latest available in the lockfile, 0.40.3), and dialyxir has been added as a dev dependency (\~\> 1.0). The mix.lock file reflects significant version bumps for transitive dependencies including decimal (2.0.0 to 3.1.1), telemetry (1.0.0 to 1.4.2), and various makeup libraries.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 60.
Lenses
- Code Health 99
- Architecture 100
- Maturity 69
- Readiness 33
- Security 100
Changes since last survey
- 108 commits — 103 feature/other, 5 fixes
By area
- (root) — 63 commits
- lib/ecto — 31 commits
- examples/dot — 5 commits
- examples/images — 3 commits
- .github/dependabot.yml — 2 commits
- examples/dbml — 1 commit
- examples/dot_images — 1 commit
- lib/mix — 1 commit
- test/ecto — 1 commit
Notable commits
- fix: Fix embedded schemas with Ecto 3.12 (#58)
- fix: Fix markdown issues raised by markdownlint (#31)
- fix: Fix schema modules scan (#61)
- fix: Fix test
- fix: fix: don't generate refs for embedded schemas (#50)
- change: Add primary key indicator to DOT format output (#62)
- change: Add :enum_values_order and :enum_values_limit options (#63)
- change: Add D2 output format (#64)
- change: Add DBML support
- change: Add Mermaid support
- change: Add PlantUML support
- change: Add QuickDBD support
- change: Add example images to repo, as they are too big for publishing to hexdocs
- change: Add hex.pm badge
- change: Ask for generating examples interactively
- change: Bump dialyxir from 1.1.0 to 1.2.0 (#34)
- change: Bump ecto from 3.7.0 to 3.7.1 (#3)
- change: Bump ecto from 3.7.1 to 3.7.2 (#20)
- change: Bump ecto from 3.7.2 to 3.8.0 (#22)
- change: Bump ecto from 3.8.0 to 3.8.1 (#23)
- …and 88 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
fuelen/ecto_erd was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 6d4eac25acd1a0fc0389e47c296a62429b59c614 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.