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

missing composite indexes in dbml #35

Closed ndrean closed 2 years ago

ndrean commented 2 years ago

I believe you generate everything from the schemas, ERDs and .dbml, not from the migrations. Given that an ERD doesn't display composite indexes but only pK, the ERDs are fine. However, composite indexes are declared in the migrations so the generated .dbml can't be converted into SQL to run a migration since indexes are missing. No way to overcome this programmatically?

ndrean commented 2 years ago

Ooops, just saw that this issue has already been raised, and you answered..., so @dbml/cli to convert a .dbml into an SQL migration, and ecto_erd to generate an ERD from the schemas.