From 80e4d029f7dd88f4c3325031e5e7f928f0aeda0e Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 24 Oct 2020 20:55:31 +0200 Subject: [PATCH] DB Schema: Make layout pretty Signed-off-by: David Mehren Co-authored-by: Yannick Bungers --- docs/dev/db-schema.plantuml | 40 +++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/docs/dev/db-schema.plantuml b/docs/dev/db-schema.plantuml index c42827aea..789eac254 100644 --- a/docs/dev/db-schema.plantuml +++ b/docs/dev/db-schema.plantuml @@ -1,9 +1,6 @@ @startuml -' hide the spot hide circle - -' avoid problems with angled crows feet -skinparam linetype ortho +skinparam nodesep 60 entity "Note" { *id : uuid <> @@ -132,21 +129,26 @@ entity "MediaUpload" { *createdAt : date } -Note "1" - "1..*" Revision +User "1" -- "0..*" Note: owner +User "1" -u- "1..*" Identity +User "1" - "1..*" authToken +User "1" -l- "1..*" Session +User "1" - "0..*" MediaUpload +User "0..*" -- "0..*" Note +User "1" - "0..*" Authorship + +(User, Note) . AuthorColors + Revision "0..*" - "0..*" Authorship (Revision, Authorship) .. RevisionAuthorship -Authorship "0..*" -- "1" User -Note "0..*" -- "1" User : owner -Note "1" -- "0..*" NoteUserPermission -NoteUserPermission "1" -- "1" User -Note "1" -- "0..*" NoteGroupPermission -NoteGroupPermission "0..*" -- "1" Group -Identity "1..*" -- "1" User -authToken "1..*" -- "1" User -Session "1..*" -- "1" User -Note "0..*" -- "0..*" User : color -(Note, User) .. AuthorColors -Note "0..*" -- "0..*" Tag : tags -MediaUpload "0..*" -- "1" Note -MediaUpload "0..*" -- "1" User + +MediaUpload "0..*" -- "1" Note +Note "1" - "1..*" Revision +Note "0..*" -l- "0..*" Tag +Note "0..*" -- "0..*" Group + +User "0..*" -- "0..*" Note +(User, Note) . NoteUserPermission +(Note, Group) . NoteGroupPermission + @enduml