k1LoW / tbls

tbls is a CI-Friendly tool for document a database, written in Go.
MIT License
3.44k stars 165 forks source link

Better ER diagrams with more than two rows #465

Open carlsmedstad opened 1 year ago

carlsmedstad commented 1 year ago

The following schema becomes a bit hard to read due to so many intersected relations:

schema er_diagram

It seems tbls is limited to putting tables on two "rows" while some tables would fit better on a separate third row. Would it be possible to implement a feature where tbls either would produce a more vertical schema, or where one could specify how many rows tbls should put tables on?

k1LoW commented 1 year ago

Hi @carlsmedstad

It seems tbls is limited to putting tables on two "rows"

It is not specifically limited to two rows. This is done automatically by Graphviz, which is built into the system.

The following sample shows the placement of two or more rows.

https://github.com/k1LoW/tbls/tree/main/sample/mysql

Unfortunately, the placement of the diagram is left to the Graphviz engine and is not controllable.