Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would like to see more info about columns #5

Open
paunin opened this issue Apr 4, 2018 · 4 comments
Open

Would like to see more info about columns #5

paunin opened this issue Apr 4, 2018 · 4 comments

Comments

@paunin
Copy link

paunin commented Apr 4, 2018

Would like to see more info about columns

  • Type
  • If field[s] is indexed
  • Comment

My personal rules:

  • column definition: {name} {SQL type} [-- {comment}]
  • Primary keys should be in the header of each table
  • Foreign keys should be marked with + (will be displayed as green dot) with reference in comment
  • Indexed fields should be marked as bold
  • Comments starts with --
  • Comments for table should be put in header of each table
  • Relationships should be placed
@paunin
Copy link
Author

paunin commented Apr 4, 2018

and see no need to mark PK with [PK] btw

@achiku
Copy link
Owner

achiku commented Apr 7, 2018

That's may be nice to have feature. Since this tool is using Go template to write PlantUML, it'll be easy to make it customizable. Could you send pr?

@mmauger
Copy link
Contributor

mmauger commented May 13, 2021

I have posted a related PR for reformatting the format. Take a look at template.go to adjust the formatting, and sql.go for the SQL that fetches table and column details if you need more.

Locally I have a change that uses DOMAINs to rename BIGINTs so that I can implicitly add (non-declared, but logically present) FK from arrays to detail tables. The code is specific to our site but as long as the data is made available the templates lay things out appropriately.

@mmauger
Copy link
Contributor

mmauger commented May 13, 2021

Related issue: I wanted to label relationship lines with the "from" column names and added them to the templates, but layout is really bad (the labels get laid out in a grid unrelated to the relationship lines they are associated with)
One ||-o{ Two : Field1, field2
lays out One and Two with the appropriate line between them, but the field1, field2 text appears on the diagram unrelated to the relationship. Should we use a different syntax in the UML?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants