After a project reaches a certain size the diagram starts to become so large it loses usefulness. What if we could optionally group schemas and then generate one diagram per group. Schemas can appear in zero or more groups. A simple solution might be something like defining a function in each schema to define the groups it belongs to:
def erd_groups(), do: [:project, :accounting]
Now this schema would make an appearance in the project and accounting diagrams. It's a little bit of configuration built right into the schemas that makes the diagrams a whole lot more readable.
I don't think it HAS to be built into the code, but I think it helps people remember to update/add it when they add a new schema. But I think it would be ok if the configuration was external to the schema. Keeping it in .ecto_erd.exs is also an acceptable option. Or maybe implementing a tag?
After a project reaches a certain size the diagram starts to become so large it loses usefulness. What if we could optionally group schemas and then generate one diagram per group. Schemas can appear in zero or more groups. A simple solution might be something like defining a function in each schema to define the groups it belongs to:
Now this schema would make an appearance in the
project
andaccounting
diagrams. It's a little bit of configuration built right into the schemas that makes the diagrams a whole lot more readable.I don't think it HAS to be built into the code, but I think it helps people remember to update/add it when they add a new schema. But I think it would be ok if the configuration was external to the schema. Keeping it in
.ecto_erd.exs
is also an acceptable option. Or maybe implementing a tag?