KarnerTh / mermerd

Create Mermaid-Js ERD diagrams from existing tables
MIT License
460 stars 35 forks source link

Add NOT NULL constraint to descriptions #42

Closed lnschroeder closed 1 year ago

lnschroeder commented 1 year ago

Motivation It would be great if it was possible to to visualize NOT NULL constraints.

Solution Unfortunately, Mermaid does not support special characters (such as asterisks) in the name column. Instead the comment column could be used (as suggested here).

To toggle this, notNull could be added to the showDescription flag e.g.

showDescriptions:
  - columnComments
  - enumValues
  - notNull

image

I am happy to make a PR for this.

All feedback is welcome :)

KarnerTh commented 1 year ago

Totally agree!

Feel free to create a PR :) I am on vacation, but as soon as I am back I will review it

KarnerTh commented 1 year ago

Change is available in version 0.9.0.

Thanks for your contribution 🙌🏼