diff --git a/output/dot/templates/schema.dot.tmpl b/output/dot/templates/schema.dot.tmpl index c6b949dd..a4c2ab4e 100644 --- a/output/dot/templates/schema.dot.tmpl +++ b/output/dot/templates/schema.dot.tmpl @@ -12,7 +12,7 @@ digraph "{{ .Schema.Name }}" { {{ $t.Name | html }}    [{{ $t.Type | html }}]{{ if $sc }}{{ if ne $t.Comment "" }}
{{ $t.Comment | html | nl2br_slash }}{{ end }}{{ end }} {{- range $ii, $c := $t.Columns }} {{- if $c.HideForER }}{{ continue }}{{ end }} - {{ $c.Name | html }} [{{ $c.Type | html }}]{{ if $sc }}{{ if ne $c.Comment "" }} {{ $c.Comment | html | nl2space }}{{ end }}{{ end }} + {{ $c.Name | html }}    [{{ $c.Type | html }}]{{ if $sc }}{{ if ne $c.Comment "" }} {{ $c.Comment | html | nl2space }}{{ end }}{{ end }} {{- end }} >]; {{- end }} diff --git a/output/dot/templates/table.dot.tmpl b/output/dot/templates/table.dot.tmpl index 91839fcb..ce69712f 100644 --- a/output/dot/templates/table.dot.tmpl +++ b/output/dot/templates/table.dot.tmpl @@ -16,10 +16,10 @@ digraph "{{ .Table.Name }}" { >]; {{- range $i, $t := .Tables }} "{{ $t.Name }}" [shape=none, label=< - + {{- range $ii, $c := $t.Columns }} {{- if $c.HideForER }}{{ continue }}{{ end }} - + {{- end }}
{{ $t.Name | html }} [{{ $t.Type | html }}]{{ if $sc }}{{ if ne $t.Comment "" }}
{{ $t.Comment | html | nl2br_slash }}{{ end }}{{ end }}
{{ $t.Name | html }}    [{{ $t.Type | html }}]{{ if $sc }}{{ if ne $t.Comment "" }}
{{ $t.Comment | html | nl2br_slash }}{{ end }}{{ end }}
{{ $c.Name | html }} [{{ $c.Type | html }}]{{ if $sc }}{{ if ne $c.Comment "" }} {{ $c.Comment | html | nl2space }}{{ end }}{{ end }}
{{ $c.Name | html }}    [{{ $c.Type | html }}]{{ if $sc }}{{ if ne $c.Comment "" }} {{ $c.Comment | html | nl2space }}{{ end }}{{ end }}
>]; {{- end }} diff --git a/sample/adjust/README.md b/sample/adjust/README.md index d7637f5a..3a16fed1 100644 --- a/sample/adjust/README.md +++ b/sample/adjust/README.md @@ -29,6 +29,7 @@ Sample PostgreSQL database document. | Name | ReturnType | Arguments | Type | | ------------------------- | ---------- | ------------------------- | --------- | +| public.reset_comment | void | IN comment_id integer | PROCEDURE | | public.uuid_nil | uuid | | FUNCTION | | public.uuid_ns_dns | uuid | | FUNCTION | | public.uuid_ns_url | uuid | | FUNCTION | @@ -40,7 +41,6 @@ Sample PostgreSQL database document. | public.uuid_generate_v4 | uuid | | FUNCTION | | public.uuid_generate_v5 | uuid | namespace uuid, name text | FUNCTION | | public.update_updated | trigger | | FUNCTION | -| public.reset_comment | void | IN comment_id integer | PROCEDURE | ## Relations diff --git a/sample/adjust/administrator.blogs.svg b/sample/adjust/administrator.blogs.svg index 867b67ae..504935c3 100644 --- a/sample/adjust/administrator.blogs.svg +++ b/sample/adjust/administrator.blogs.svg @@ -40,35 +40,35 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] administrator.blogs:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE diff --git a/sample/adjust/backup.blog_options.svg b/sample/adjust/backup.blog_options.svg index 2243bdf3..858a77bc 100644 --- a/sample/adjust/backup.blog_options.svg +++ b/sample/adjust/backup.blog_options.svg @@ -34,32 +34,32 @@ backup.blogs - - -backup.blogs - -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -dump -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +backup.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +dump     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] backup.blog_options:blog_id->backup.blogs:id - - + + FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE diff --git a/sample/adjust/backup.blogs.svg b/sample/adjust/backup.blogs.svg index c0728a48..5a3cc1ea 100644 --- a/sample/adjust/backup.blogs.svg +++ b/sample/adjust/backup.blogs.svg @@ -4,62 +4,62 @@ - + backup.blogs - + backup.blogs - - -backup.blogs -     -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -dump -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] - + + +backup.blogs +     +[BASE TABLE] + +id +[integer] + +user_id +[integer] + +dump +[text] + +created +[timestamp without time zone] + +updated +[timestamp without time zone] + backup.blog_options - - -backup.blog_options - -[BASE TABLE] - -id -[integer] - -blog_id -[integer] - -label -[text] - -updated -[timestamp without time zone] + + +backup.blog_options +     +[BASE TABLE] + +id     +[integer] + +blog_id     +[integer] + +label     +[text] + +updated     +[timestamp without time zone] backup.blog_options:blog_id->backup.blogs:id - - + + FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE diff --git a/sample/adjust/public.CamelizeTable.svg b/sample/adjust/public.CamelizeTable.svg index 1b5091bd..d3df0025 100644 --- a/sample/adjust/public.CamelizeTable.svg +++ b/sample/adjust/public.CamelizeTable.svg @@ -4,53 +4,53 @@ - + public.CamelizeTable - + public.CamelizeTable - - -public.CamelizeTable -     -[BASE TABLE] - -id -[uuid] - -created -[timestamp without time zone] - + + +public.CamelizeTable +     +[BASE TABLE] + +id +[uuid] + +created +[timestamp without time zone] + public.hyphen-table - - -public.hyphen-table - -[BASE TABLE] - -id -[uuid] - -hyphen-column -[text] - -CamelizeTableId -[uuid] - -created -[timestamp without time zone] + + +public.hyphen-table +     +[BASE TABLE] + +id     +[uuid] + +hyphen-column     +[text] + +CamelizeTableId     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table:CamelizeTableId->public.CamelizeTable:id - - + + FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE diff --git a/sample/adjust/public.comment_stars.svg b/sample/adjust/public.comment_stars.svg index 5847fd3e..526c1cab 100644 --- a/sample/adjust/public.comment_stars.svg +++ b/sample/adjust/public.comment_stars.svg @@ -40,32 +40,32 @@ public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -77,29 +77,29 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -111,39 +111,39 @@ public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:comment_star_id->public.comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/adjust/public.comments.svg b/sample/adjust/public.comments.svg index 49fc2a4c..dbdee89a 100644 --- a/sample/adjust/public.comments.svg +++ b/sample/adjust/public.comments.svg @@ -4,186 +4,186 @@ - + public.comments - + public.comments - - -public.comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] - + + +public.comments +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[integer] + +comment +[text] + +post_id_desc +[bigint] + +created +[timestamp without time zone] + +updated +[timestamp without time zone] + public.posts - - -public.posts - -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:post_id->public.posts:id - - -FOREIGN KEY (post_id) REFERENCES posts(id) + + +FOREIGN KEY (post_id) REFERENCES posts(id) public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) + + +FOREIGN KEY (user_id) REFERENCES users(id) public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:comment_id->public.comments:id - - -Additional Relation + + +Additional Relation public.comment_stars - - -public.comment_stars - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -comment_post_id -[bigint] - -comment_user_id -[integer] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comment_stars +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +comment_post_id     +[bigint] + +comment_user_id     +[integer] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comment_stars:comment_post_id->public.comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id) diff --git a/sample/adjust/public.hyphen-table.svg b/sample/adjust/public.hyphen-table.svg index 37d46bc5..e4f01fe9 100644 --- a/sample/adjust/public.hyphen-table.svg +++ b/sample/adjust/public.hyphen-table.svg @@ -4,11 +4,11 @@ - + public.hyphen-table - + public.hyphen-table @@ -34,23 +34,23 @@ public.CamelizeTable - - -public.CamelizeTable - -[BASE TABLE] - -id -[uuid] - -created -[timestamp without time zone] + + +public.CamelizeTable +     +[BASE TABLE] + +id     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table:CamelizeTableId->public.CamelizeTable:id - - + + FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE diff --git a/sample/adjust/public.logs.svg b/sample/adjust/public.logs.svg index e6014280..752501d6 100644 --- a/sample/adjust/public.logs.svg +++ b/sample/adjust/public.logs.svg @@ -4,186 +4,186 @@ - + public.logs - + public.logs - - -public.logs -     -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] - + + +public.logs +     +[BASE TABLE] + +id +[uuid] + +user_id +[integer] + +post_id +[bigint] + +comment_id +[bigint] + +comment_star_id +[uuid] + +payload +[text] + +created +[timestamp without time zone] + public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:user_id->public.users:id - - -logs->users + + +logs->users public.posts - - -public.posts - -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:post_id->public.posts:id - - -Additional Relation + + +Additional Relation public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:comment_id->public.comments:id - - -Additional Relation + + +Additional Relation public.comment_stars - - -public.comment_stars - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -comment_post_id -[bigint] - -comment_user_id -[integer] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comment_stars +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +comment_post_id     +[bigint] + +comment_user_id     +[integer] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:comment_star_id->public.comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/adjust/public.posts.svg b/sample/adjust/public.posts.svg index 4036208a..afecc5cf 100644 --- a/sample/adjust/public.posts.svg +++ b/sample/adjust/public.posts.svg @@ -4,11 +4,11 @@ - + public.posts - + public.posts @@ -46,66 +46,66 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.posts:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -117,32 +117,32 @@ public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] diff --git a/sample/adjust/public.user_options.svg b/sample/adjust/public.user_options.svg index b9962b08..b7037a32 100644 --- a/sample/adjust/public.user_options.svg +++ b/sample/adjust/public.user_options.svg @@ -34,35 +34,35 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.user_options:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE diff --git a/sample/adjust/public.users.svg b/sample/adjust/public.users.svg index af631cc6..fa92471f 100644 --- a/sample/adjust/public.users.svg +++ b/sample/adjust/public.users.svg @@ -4,248 +4,248 @@ - + public.users - + public.users - - -public.users -     -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] - + + +public.users +     +[BASE TABLE] + +id +[integer] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp without time zone] + +updated +[timestamp without time zone] + public.user_options - - -public.user_options - -[BASE TABLE] - -user_id -[integer] - -show_email -[boolean] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.user_options +     +[BASE TABLE] + +user_id     +[integer] + +show_email     +[boolean] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.user_options:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.posts - - -public.posts - -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.posts:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) + + +FOREIGN KEY (user_id) REFERENCES users(id) public.comment_stars - - -public.comment_stars - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -comment_post_id -[bigint] - -comment_user_id -[integer] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comment_stars +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +comment_post_id     +[bigint] + +comment_user_id     +[integer] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comment_stars:comment_user_id->public.users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users(id) + + +FOREIGN KEY (comment_user_id) REFERENCES users(id) administrator.blogs - - -administrator.blogs - -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -name -[text] - -description -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +administrator.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +name     +[text] + +description     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] administrator.blogs:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:user_id->public.users:id - - -logs->users + + +logs->users diff --git a/sample/adjust/schema.svg b/sample/adjust/schema.svg index 322d0fe7..7f63463a 100644 --- a/sample/adjust/schema.svg +++ b/sample/adjust/schema.svg @@ -4,37 +4,37 @@ - + testdb - + public.users - - -public.users -     -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -45,108 +45,108 @@      [BASE TABLE] -user_id -[integer] +user_id     +[integer] -show_email -[boolean] +show_email     +[boolean] -created -[timestamp without time zone] +created     +[timestamp without time zone] -updated -[timestamp without time zone] +updated     +[timestamp without time zone] public.user_options:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.posts - - -public.posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.posts:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.comments - - -public.comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) + + +FOREIGN KEY (user_id) REFERENCES users(id) public.comments:post_id->public.posts:id - - -FOREIGN KEY (post_id) REFERENCES posts(id) + + +FOREIGN KEY (post_id) REFERENCES posts(id) @@ -157,334 +157,334 @@      [BASE TABLE] -id -[uuid] +id     +[uuid] -user_id -[integer] +user_id     +[integer] -comment_post_id -[bigint] +comment_post_id     +[bigint] -comment_user_id -[integer] +comment_user_id     +[integer] -created -[timestamp without time zone] +created     +[timestamp without time zone] -updated -[timestamp without time zone] +updated     +[timestamp without time zone] public.comment_stars:comment_user_id->public.users:id - - + + FOREIGN KEY (comment_user_id) REFERENCES users(id) public.comment_stars:comment_post_id->public.comments:post_id - - + + FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id) public.logs - - -public.logs -     -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:user_id->public.users:id - - -logs->users + + +logs->users public.logs:post_id->public.posts:id - - -Additional Relation + + +Additional Relation public.logs:comment_id->public.comments:id - - -Additional Relation + + +Additional Relation public.logs:comment_star_id->public.comment_stars:id - - -Additional Relation + + +Additional Relation public.post_comments - - -public.post_comments -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.post_comments +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.post_comment_stars - - -public.post_comment_stars -     -[MATERIALIZED VIEW] - -id -[uuid] - -comment_user -[varchar(50)] - -comment_star_user -[varchar(50)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.post_comment_stars +     +[MATERIALIZED VIEW] + +id     +[uuid] + +comment_user     +[varchar(50)] + +comment_star_user     +[varchar(50)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.CamelizeTable - - -public.CamelizeTable -     -[BASE TABLE] - -id -[uuid] - -created -[timestamp without time zone] + + +public.CamelizeTable +     +[BASE TABLE] + +id     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table - - -public.hyphen-table -     -[BASE TABLE] - -id -[uuid] - -hyphen-column -[text] - -CamelizeTableId -[uuid] - -created -[timestamp without time zone] + + +public.hyphen-table +     +[BASE TABLE] + +id     +[uuid] + +hyphen-column     +[text] + +CamelizeTableId     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table:CamelizeTableId->public.CamelizeTable:id - - -FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE + + +FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE administrator.blogs - - -administrator.blogs -     -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -name -[text] - -description -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +administrator.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +name     +[text] + +description     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] administrator.blogs:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE backup.blogs - - -backup.blogs -     -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -dump -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +backup.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +dump     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] backup.blog_options - - -backup.blog_options -     -[BASE TABLE] - -id -[integer] - -blog_id -[integer] - -label -[text] - -updated -[timestamp without time zone] + + +backup.blog_options +     +[BASE TABLE] + +id     +[integer] + +blog_id     +[integer] + +label     +[text] + +updated     +[timestamp without time zone] backup.blog_options:blog_id->backup.blogs:id - - -FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE + + +FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE time.bar - - -time.bar -     -[BASE TABLE] - -id -[integer] + + +time.bar +     +[BASE TABLE] + +id     +[integer] time.hyphenated-table - - -time.hyphenated-table -     -[BASE TABLE] - -id -[integer] + + +time.hyphenated-table +     +[BASE TABLE] + +id     +[integer] time.referencing - - -time.referencing -     -[BASE TABLE] - -id -[integer] - -bar_id -[integer] - -ht_id -[integer] + + +time.referencing +     +[BASE TABLE] + +id     +[integer] + +bar_id     +[integer] + +ht_id     +[integer] time.referencing:bar_id->time.bar:id - - -FOREIGN KEY (bar_id) REFERENCES "time".bar(id) + + +FOREIGN KEY (bar_id) REFERENCES "time".bar(id) time.referencing:ht_id->time.hyphenated-table:id - - -FOREIGN KEY (ht_id) REFERENCES "time"."hyphenated-table"(id) + + +FOREIGN KEY (ht_id) REFERENCES "time"."hyphenated-table"(id) diff --git a/sample/adjust/time.bar.svg b/sample/adjust/time.bar.svg index 7ab5c505..414a7054 100644 --- a/sample/adjust/time.bar.svg +++ b/sample/adjust/time.bar.svg @@ -4,48 +4,48 @@ - + time.bar - + time.bar - - -time.bar -     -[BASE TABLE] - -id -[integer] - + + +time.bar +     +[BASE TABLE] + +id +[integer] + time.referencing - - -time.referencing - -[BASE TABLE] - -id -[integer] - -bar_id -[integer] - -ht_id -[integer] + + +time.referencing +     +[BASE TABLE] + +id     +[integer] + +bar_id     +[integer] + +ht_id     +[integer] time.referencing:bar_id->time.bar:id - - -FOREIGN KEY (bar_id) REFERENCES "time".bar(id) + + +FOREIGN KEY (bar_id) REFERENCES "time".bar(id) diff --git a/sample/adjust/time.hyphenated-table.svg b/sample/adjust/time.hyphenated-table.svg index 58bbb997..a4f994d6 100644 --- a/sample/adjust/time.hyphenated-table.svg +++ b/sample/adjust/time.hyphenated-table.svg @@ -25,20 +25,20 @@ time.referencing - - -time.referencing - -[BASE TABLE] - -id -[integer] - -bar_id -[integer] - -ht_id -[integer] + + +time.referencing +     +[BASE TABLE] + +id     +[integer] + +bar_id     +[integer] + +ht_id     +[integer] diff --git a/sample/adjust/time.referencing.svg b/sample/adjust/time.referencing.svg index f0bb10ef..b224b74c 100644 --- a/sample/adjust/time.referencing.svg +++ b/sample/adjust/time.referencing.svg @@ -31,14 +31,14 @@ time.bar - - -time.bar - -[BASE TABLE] - -id -[integer] + + +time.bar +     +[BASE TABLE] + +id     +[integer] @@ -50,14 +50,14 @@ time.hyphenated-table - - -time.hyphenated-table - -[BASE TABLE] - -id -[integer] + + +time.hyphenated-table +     +[BASE TABLE] + +id     +[integer] diff --git a/sample/detect_relations/comment_stars.svg b/sample/detect_relations/comment_stars.svg index 5f809325..e879789a 100644 --- a/sample/detect_relations/comment_stars.svg +++ b/sample/detect_relations/comment_stars.svg @@ -4,11 +4,11 @@ - + comment_stars - + comment_stars @@ -40,73 +40,73 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:user_id->users:id - - + + Detected Relation logs - - -logs - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] logs:comment_star_id->comment_stars:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations/comments.svg b/sample/detect_relations/comments.svg index 732ac86f..740242f2 100644 --- a/sample/detect_relations/comments.svg +++ b/sample/detect_relations/comments.svg @@ -4,146 +4,146 @@ - + comments - + comments - - -comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] - + + +comments +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[int] + +comment +[text] + +created +[datetime] + +updated +[datetime] + posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -Detected Relation + + +Detected Relation users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comments:user_id->users:id - - -Detected Relation + + +Detected Relation logs - - -logs - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] logs:comment_id->comments:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations/logs.svg b/sample/detect_relations/logs.svg index ea994b62..cc503915 100644 --- a/sample/detect_relations/logs.svg +++ b/sample/detect_relations/logs.svg @@ -4,180 +4,180 @@ - + logs - + logs - - -logs -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] - + + +logs +     +[BASE TABLE] + +id +[bigint] + +user_id +[int] + +post_id +[bigint] + +comment_id +[bigint] + +comment_star_id +[bigint] + +payload +[text] + +created +[datetime] + users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] logs:user_id->users:id - - -Detected Relation + + +Detected Relation posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] logs:post_id->posts:id - - -Detected Relation + + +Detected Relation comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] logs:comment_id->comments:id - - -Detected Relation + + +Detected Relation comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] logs:comment_star_id->comment_stars:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations/posts.svg b/sample/detect_relations/posts.svg index 5a7cd795..57d3e9c9 100644 --- a/sample/detect_relations/posts.svg +++ b/sample/detect_relations/posts.svg @@ -4,146 +4,146 @@ - + posts - + posts - - -posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] - + + +posts +     +[BASE TABLE] + +id +[bigint] + +user_id +[int] + +title +[varchar(255)] + +body +[text] + +post_type +[enum('public','private','draft')] + +created +[datetime] + +updated +[datetime] + users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] posts:user_id->users:id - - -Detected Relation + + +Detected Relation comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -Detected Relation + + +Detected Relation logs - - -logs - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] logs:post_id->posts:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations/schema.svg b/sample/detect_relations/schema.svg index 58c0366a..f652c42c 100644 --- a/sample/detect_relations/schema.svg +++ b/sample/detect_relations/schema.svg @@ -4,11 +4,11 @@ - + relations - + CamelizeTable @@ -18,284 +18,284 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -created -[datetime] +created     +[datetime] comment_stars - - -comment_stars -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] users - - -users -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:user_id->users:id - - -Detected Relation + + +Detected Relation comments - - -comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] posts - - -posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -Detected Relation + + +Detected Relation comments:user_id->users:id - - -Detected Relation + + +Detected Relation hyphen-table - - -hyphen-table -     -[BASE TABLE] - -id -[bigint] - -hyphen-column -[text] - -created -[datetime] + + +hyphen-table +     +[BASE TABLE] + +id     +[bigint] + +hyphen-column     +[text] + +created     +[datetime] logs - - -logs -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] logs:comment_star_id->comment_stars:id - - + + Detected Relation logs:comment_id->comments:id - - -Detected Relation + + +Detected Relation logs:post_id->posts:id - - + + Detected Relation logs:user_id->users:id - - -Detected Relation + + +Detected Relation post_comments - - -post_comments -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[datetime] - -updated -[datetime] + + +post_comments +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -Detected Relation + + +Detected Relation user_options - - -user_options -     -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/detect_relations/user_options.svg b/sample/detect_relations/user_options.svg index f13acdf2..eef6f004 100644 --- a/sample/detect_relations/user_options.svg +++ b/sample/detect_relations/user_options.svg @@ -34,35 +34,35 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/detect_relations/users.svg b/sample/detect_relations/users.svg index 4b28d6cf..4497076c 100644 --- a/sample/detect_relations/users.svg +++ b/sample/detect_relations/users.svg @@ -4,208 +4,208 @@ - + users - + users - - -users -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] - + + +users +     +[BASE TABLE] + +id +[int] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp] + +updated +[timestamp] + user_options - - -user_options - -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:user_id->users:id - - -Detected Relation + + +Detected Relation comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] comments:user_id->users:id - - -Detected Relation + + +Detected Relation logs - - -logs - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] logs:user_id->users:id - - -Detected Relation + + +Detected Relation posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations_singular/comment.svg b/sample/detect_relations_singular/comment.svg index 18718e89..b88a4423 100644 --- a/sample/detect_relations_singular/comment.svg +++ b/sample/detect_relations_singular/comment.svg @@ -4,146 +4,146 @@ - + comment - + comment - - -comment -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] - + + +comment +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[int] + +comment +[text] + +created +[datetime] + +updated +[datetime] + post - - -post - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +post +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comment:post_id->post:id - - -Detected Relation + + +Detected Relation user - - -user - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +user +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment:user_id->user:id - - -Detected Relation + + +Detected Relation log - - -log - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +log +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] log:comment_id->comment:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations_singular/comment_star.svg b/sample/detect_relations_singular/comment_star.svg index 7b9060e4..efb8358c 100644 --- a/sample/detect_relations_singular/comment_star.svg +++ b/sample/detect_relations_singular/comment_star.svg @@ -40,73 +40,73 @@ user - - -user - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +user +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment_star:user_id->user:id - - + + Detected Relation log - - -log - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +log +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] log:comment_star_id->comment_star:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations_singular/log.svg b/sample/detect_relations_singular/log.svg index 7dd1a1e8..cad9766b 100644 --- a/sample/detect_relations_singular/log.svg +++ b/sample/detect_relations_singular/log.svg @@ -4,180 +4,180 @@ - + log - + log - - -log -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] - + + +log +     +[BASE TABLE] + +id +[bigint] + +user_id +[int] + +post_id +[bigint] + +comment_id +[bigint] + +comment_star_id +[bigint] + +payload +[text] + +created +[datetime] + user - - -user - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +user +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] log:user_id->user:id - - -Detected Relation + + +Detected Relation post - - -post - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +post +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] log:post_id->post:id - - -Detected Relation + + +Detected Relation comment - - -comment - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comment +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] log:comment_id->comment:id - - -Detected Relation + + +Detected Relation comment_star - - -comment_star - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_star +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] log:comment_star_id->comment_star:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations_singular/post.svg b/sample/detect_relations_singular/post.svg index 038576cb..70ff7cd2 100644 --- a/sample/detect_relations_singular/post.svg +++ b/sample/detect_relations_singular/post.svg @@ -4,146 +4,146 @@ - + post - + post - - -post -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] - + + +post +     +[BASE TABLE] + +id +[bigint] + +user_id +[int] + +title +[varchar(255)] + +body +[text] + +post_type +[enum('public','private','draft')] + +created +[datetime] + +updated +[datetime] + user - - -user - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +user +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] post:user_id->user:id - - -Detected Relation + + +Detected Relation comment - - -comment - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comment +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] comment:post_id->post:id - - -Detected Relation + + +Detected Relation log - - -log - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +log +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] log:post_id->post:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations_singular/schema.svg b/sample/detect_relations_singular/schema.svg index df59f4df..83cd3898 100644 --- a/sample/detect_relations_singular/schema.svg +++ b/sample/detect_relations_singular/schema.svg @@ -4,298 +4,298 @@ - + relations_singular - + CamelizeTable - - -CamelizeTable -     -[BASE TABLE] - -id -[bigint] - -created -[datetime] + + +CamelizeTable +     +[BASE TABLE] + +id     +[bigint] + +created     +[datetime] comment - - -comment -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comment +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] post - - -post -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +post +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comment:post_id->post:id - - -Detected Relation + + +Detected Relation user - - -user -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +user +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment:user_id->user:id - - -Detected Relation + + +Detected Relation comment_star - - -comment_star -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_star +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_star:user_id->user:id - - -Detected Relation + + +Detected Relation hyphen-table - - -hyphen-table -     -[BASE TABLE] - -id -[bigint] - -hyphen-column -[text] - -created -[datetime] + + +hyphen-table +     +[BASE TABLE] + +id     +[bigint] + +hyphen-column     +[text] + +created     +[datetime] log - - -log -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +log +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] log:comment_id->comment:id - - -Detected Relation + + +Detected Relation log:comment_star_id->comment_star:id - - -Detected Relation + + +Detected Relation log:post_id->post:id - - -Detected Relation + + +Detected Relation log:user_id->user:id - - -Detected Relation + + +Detected Relation post:user_id->user:id - - -Detected Relation + + +Detected Relation post_comment - - -post_comment -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[datetime] - -updated -[datetime] + + +post_comment +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[datetime] + +updated     +[datetime] user_option - - -user_option -     -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_option +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_option:user_id->user:id - - -FOREIGN KEY (user_id) REFERENCES user (id) + + +FOREIGN KEY (user_id) REFERENCES user (id) diff --git a/sample/detect_relations_singular/user.svg b/sample/detect_relations_singular/user.svg index 80123a28..abcb7f3a 100644 --- a/sample/detect_relations_singular/user.svg +++ b/sample/detect_relations_singular/user.svg @@ -4,208 +4,208 @@ - + user - + user - - -user -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] - + + +user +     +[BASE TABLE] + +id +[int] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp] + +updated +[timestamp] + user_option - - -user_option - -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_option +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_option:user_id->user:id - - -FOREIGN KEY (user_id) REFERENCES user (id) + + +FOREIGN KEY (user_id) REFERENCES user (id) comment - - -comment - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comment +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] comment:user_id->user:id - - -Detected Relation + + +Detected Relation comment_star - - -comment_star - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_star +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_star:user_id->user:id - - -Detected Relation + + +Detected Relation log - - -log - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +log +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] log:user_id->user:id - - -Detected Relation + + +Detected Relation post - - -post - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +post +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] post:user_id->user:id - - -Detected Relation + + +Detected Relation diff --git a/sample/detect_relations_singular/user_option.svg b/sample/detect_relations_singular/user_option.svg index 28efc7d3..993eeff5 100644 --- a/sample/detect_relations_singular/user_option.svg +++ b/sample/detect_relations_singular/user_option.svg @@ -34,35 +34,35 @@ user - - -user - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +user +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] user_option:user_id->user:id - - + + FOREIGN KEY (user_id) REFERENCES user (id) diff --git a/sample/dict/comment_stars.svg b/sample/dict/comment_stars.svg index 630f95ae..456c4922 100644 --- a/sample/dict/comment_stars.svg +++ b/sample/dict/comment_stars.svg @@ -40,32 +40,32 @@ comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] @@ -77,29 +77,29 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] diff --git a/sample/dict/comments.svg b/sample/dict/comments.svg index fe7d8d06..e01945d3 100644 --- a/sample/dict/comments.svg +++ b/sample/dict/comments.svg @@ -4,146 +4,146 @@ - + comments - + comments - - -comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] - + + +comments +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[int] + +comment +[text] + +post_id_desc +[bigint] + +created +[datetime] + +updated +[datetime] + posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_post_id->comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) diff --git a/sample/dict/posts.svg b/sample/dict/posts.svg index 0c40c34c..df99fdc6 100644 --- a/sample/dict/posts.svg +++ b/sample/dict/posts.svg @@ -43,73 +43,73 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) diff --git a/sample/dict/schema.svg b/sample/dict/schema.svg index 850d7fa9..4870e3d7 100644 --- a/sample/dict/schema.svg +++ b/sample/dict/schema.svg @@ -4,11 +4,11 @@ - + testdb - + CamelizeTable @@ -18,11 +18,11 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -created -[datetime] +created     +[datetime] @@ -33,23 +33,23 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -user_id -[int] +user_id     +[int] -comment_post_id -[bigint] +comment_post_id     +[bigint] -comment_user_id -[int] +comment_user_id     +[int] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] @@ -60,26 +60,26 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -post_id -[bigint] +post_id     +[bigint] -user_id -[int] +user_id     +[int] -comment -[text] +comment     +[text] -post_id_desc -[bigint] +post_id_desc     +[bigint] -created -[datetime] +created     +[datetime] -updated -[datetime] +updated     +[datetime] @@ -91,66 +91,66 @@ users - - + + users      [BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - + FOREIGN KEY (comment_user_id) REFERENCES users (id) posts - - -posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] @@ -162,8 +162,8 @@ comments:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) @@ -175,95 +175,95 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -hyphen-column -[text] +hyphen-column     +[text] -created -[datetime] +created     +[datetime] logs - - -logs -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] long_long_long_long_long_long_long_long_table_name - - -long_long_long_long_long_long_long_long_table_name -     -[BASE TABLE] - -id -[bigint] - -created -[datetime] + + +long_long_long_long_long_long_long_long_table_name +     +[BASE TABLE] + +id     +[bigint] + +created     +[datetime] post_comments - - -post_comments -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[datetime] - -updated -[datetime] + + +post_comments +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) @@ -275,23 +275,23 @@      [BASE TABLE] -user_id -[int] +user_id     +[int] -show_email -[tinyint(1)] +show_email     +[tinyint(1)] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/dict/user_options.svg b/sample/dict/user_options.svg index f13acdf2..eef6f004 100644 --- a/sample/dict/user_options.svg +++ b/sample/dict/user_options.svg @@ -34,35 +34,35 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/dict/users.svg b/sample/dict/users.svg index 694fd861..ef4ca9cb 100644 --- a/sample/dict/users.svg +++ b/sample/dict/users.svg @@ -4,174 +4,174 @@ - + users - + users - - -users -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] - + + +users +     +[BASE TABLE] + +id +[int] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp] + +updated +[timestamp] + comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options - -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/dynamodb/Forum.svg b/sample/dynamodb/Forum.svg index 41e02033..e59194fd 100644 --- a/sample/dynamodb/Forum.svg +++ b/sample/dynamodb/Forum.svg @@ -4,45 +4,45 @@ - + Forum - + Forum - - -Forum -     -[BASIC TABLE] - -Name -[S] - + + +Forum +     +[BASIC TABLE] + +Name +[S] + Thread - - -Thread - -[BASIC TABLE] - -ForumName -[S] - -Subject -[S] + + +Thread +     +[BASIC TABLE] + +ForumName     +[S] + +Subject     +[S] Thread:ForumName->Forum:Name - - -Thread->Forum + + +Thread->Forum diff --git a/sample/dynamodb/Thread.svg b/sample/dynamodb/Thread.svg index 2c25394d..39e00543 100644 --- a/sample/dynamodb/Thread.svg +++ b/sample/dynamodb/Thread.svg @@ -4,45 +4,45 @@ - + Thread - + Thread - - -Thread -     -[BASIC TABLE] - -ForumName -[S] - -Subject -[S] - + + +Thread +     +[BASIC TABLE] + +ForumName +[S] + +Subject +[S] + Forum - - -Forum - -[BASIC TABLE] - -Name -[S] + + +Forum +     +[BASIC TABLE] + +Name     +[S] Thread:ForumName->Forum:Name - - -Thread->Forum + + +Thread->Forum diff --git a/sample/dynamodb/schema.svg b/sample/dynamodb/schema.svg index 7c595e3a..7f42bdd1 100644 --- a/sample/dynamodb/schema.svg +++ b/sample/dynamodb/schema.svg @@ -18,8 +18,8 @@      [BASIC TABLE] -Name -[S] +Name     +[S] @@ -30,8 +30,8 @@      [BASIC TABLE] -Id -[N] +Id     +[N] @@ -42,14 +42,14 @@      [BASIC TABLE] -Id -[S] +Id     +[S] -ReplyDateTime -[S] +ReplyDateTime     +[S] -PostedBy -[S] +PostedBy     +[S] @@ -60,11 +60,11 @@      [BASIC TABLE] -ForumName -[S] +ForumName     +[S] -Subject -[S] +Subject     +[S] diff --git a/sample/exclude/comment_stars.svg b/sample/exclude/comment_stars.svg index 630f95ae..456c4922 100644 --- a/sample/exclude/comment_stars.svg +++ b/sample/exclude/comment_stars.svg @@ -40,32 +40,32 @@ comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] @@ -77,29 +77,29 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] diff --git a/sample/exclude/comments.svg b/sample/exclude/comments.svg index fe7d8d06..e01945d3 100644 --- a/sample/exclude/comments.svg +++ b/sample/exclude/comments.svg @@ -4,146 +4,146 @@ - + comments - + comments - - -comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] - + + +comments +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[int] + +comment +[text] + +post_id_desc +[bigint] + +created +[datetime] + +updated +[datetime] + posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_post_id->comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) diff --git a/sample/exclude/posts.svg b/sample/exclude/posts.svg index 0c40c34c..df99fdc6 100644 --- a/sample/exclude/posts.svg +++ b/sample/exclude/posts.svg @@ -43,73 +43,73 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) diff --git a/sample/exclude/schema.svg b/sample/exclude/schema.svg index cf28450a..8faf59db 100644 --- a/sample/exclude/schema.svg +++ b/sample/exclude/schema.svg @@ -4,11 +4,11 @@ - + testdb - + comment_stars @@ -18,23 +18,23 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -user_id -[int] +user_id     +[int] -comment_post_id -[bigint] +comment_post_id     +[bigint] -comment_user_id -[int] +comment_user_id     +[int] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] @@ -45,26 +45,26 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -post_id -[bigint] +post_id     +[bigint] -user_id -[int] +user_id     +[int] -comment -[text] +comment     +[text] -post_id_desc -[bigint] +post_id_desc     +[bigint] -created -[datetime] +created     +[datetime] -updated -[datetime] +updated     +[datetime] @@ -76,66 +76,66 @@ users - - + + users      [BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - + FOREIGN KEY (comment_user_id) REFERENCES users (id) posts - - -posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] @@ -147,8 +147,8 @@ comments:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) @@ -160,14 +160,14 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -hyphen-column -[text] +hyphen-column     +[text] -created -[datetime] +created     +[datetime] @@ -178,47 +178,47 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -created -[datetime] +created     +[datetime] post_comments - - -post_comments -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[datetime] - -updated -[datetime] + + +post_comments +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) @@ -230,23 +230,23 @@      [BASE TABLE] -user_id -[int] +user_id     +[int] -show_email -[tinyint(1)] +show_email     +[tinyint(1)] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/exclude/user_options.svg b/sample/exclude/user_options.svg index f13acdf2..eef6f004 100644 --- a/sample/exclude/user_options.svg +++ b/sample/exclude/user_options.svg @@ -34,35 +34,35 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/exclude/users.svg b/sample/exclude/users.svg index 694fd861..ef4ca9cb 100644 --- a/sample/exclude/users.svg +++ b/sample/exclude/users.svg @@ -4,174 +4,174 @@ - + users - + users - - -users -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] - + + +users +     +[BASE TABLE] + +id +[int] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp] + +updated +[timestamp] + comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options - -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/font/comment_stars.png b/sample/font/comment_stars.png index 686daded..3fd1ae06 100644 Binary files a/sample/font/comment_stars.png and b/sample/font/comment_stars.png differ diff --git a/sample/font/comments.png b/sample/font/comments.png index 5c9ecb25..80364ea9 100644 Binary files a/sample/font/comments.png and b/sample/font/comments.png differ diff --git a/sample/font/posts.png b/sample/font/posts.png index 321e8718..ae62dc3e 100644 Binary files a/sample/font/posts.png and b/sample/font/posts.png differ diff --git a/sample/font/schema.png b/sample/font/schema.png index 6df33918..d11d9684 100644 Binary files a/sample/font/schema.png and b/sample/font/schema.png differ diff --git a/sample/font/user_options.png b/sample/font/user_options.png index b0d0c4de..7175031b 100644 Binary files a/sample/font/user_options.png and b/sample/font/user_options.png differ diff --git a/sample/font/users.png b/sample/font/users.png index ea41438f..f1f859cb 100644 Binary files a/sample/font/users.png and b/sample/font/users.png differ diff --git a/sample/hide/comment_stars.svg b/sample/hide/comment_stars.svg index 630f95ae..456c4922 100644 --- a/sample/hide/comment_stars.svg +++ b/sample/hide/comment_stars.svg @@ -40,32 +40,32 @@ comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] @@ -77,29 +77,29 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] diff --git a/sample/hide/comments.svg b/sample/hide/comments.svg index fe7d8d06..e01945d3 100644 --- a/sample/hide/comments.svg +++ b/sample/hide/comments.svg @@ -4,146 +4,146 @@ - + comments - + comments - - -comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] - + + +comments +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[int] + +comment +[text] + +post_id_desc +[bigint] + +created +[datetime] + +updated +[datetime] + posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_post_id->comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) diff --git a/sample/hide/posts.svg b/sample/hide/posts.svg index 0c40c34c..df99fdc6 100644 --- a/sample/hide/posts.svg +++ b/sample/hide/posts.svg @@ -43,73 +43,73 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) diff --git a/sample/hide/schema.svg b/sample/hide/schema.svg index 850d7fa9..4870e3d7 100644 --- a/sample/hide/schema.svg +++ b/sample/hide/schema.svg @@ -4,11 +4,11 @@ - + testdb - + CamelizeTable @@ -18,11 +18,11 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -created -[datetime] +created     +[datetime] @@ -33,23 +33,23 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -user_id -[int] +user_id     +[int] -comment_post_id -[bigint] +comment_post_id     +[bigint] -comment_user_id -[int] +comment_user_id     +[int] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] @@ -60,26 +60,26 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -post_id -[bigint] +post_id     +[bigint] -user_id -[int] +user_id     +[int] -comment -[text] +comment     +[text] -post_id_desc -[bigint] +post_id_desc     +[bigint] -created -[datetime] +created     +[datetime] -updated -[datetime] +updated     +[datetime] @@ -91,66 +91,66 @@ users - - + + users      [BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - + FOREIGN KEY (comment_user_id) REFERENCES users (id) posts - - -posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] @@ -162,8 +162,8 @@ comments:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) @@ -175,95 +175,95 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -hyphen-column -[text] +hyphen-column     +[text] -created -[datetime] +created     +[datetime] logs - - -logs -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] long_long_long_long_long_long_long_long_table_name - - -long_long_long_long_long_long_long_long_table_name -     -[BASE TABLE] - -id -[bigint] - -created -[datetime] + + +long_long_long_long_long_long_long_long_table_name +     +[BASE TABLE] + +id     +[bigint] + +created     +[datetime] post_comments - - -post_comments -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[datetime] - -updated -[datetime] + + +post_comments +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) @@ -275,23 +275,23 @@      [BASE TABLE] -user_id -[int] +user_id     +[int] -show_email -[tinyint(1)] +show_email     +[tinyint(1)] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/hide/user_options.svg b/sample/hide/user_options.svg index f13acdf2..eef6f004 100644 --- a/sample/hide/user_options.svg +++ b/sample/hide/user_options.svg @@ -34,35 +34,35 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/hide/users.svg b/sample/hide/users.svg index 694fd861..ef4ca9cb 100644 --- a/sample/hide/users.svg +++ b/sample/hide/users.svg @@ -4,174 +4,174 @@ - + users - + users - - -users -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] - + + +users +     +[BASE TABLE] + +id +[int] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp] + +updated +[timestamp] + comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options - -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/hide_not_related_column/comment_stars.svg b/sample/hide_not_related_column/comment_stars.svg index 3857bfe5..4a2c5a43 100644 --- a/sample/hide_not_related_column/comment_stars.svg +++ b/sample/hide_not_related_column/comment_stars.svg @@ -31,20 +31,20 @@ comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] @@ -56,14 +56,14 @@ users - - -users - -[BASE TABLE] - -id -[int] + + +users +     +[BASE TABLE] + +id     +[int] @@ -75,23 +75,23 @@ logs - - -logs - -[BASE TABLE] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] + + +logs +     +[BASE TABLE] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] diff --git a/sample/hide_not_related_column/comments.svg b/sample/hide_not_related_column/comments.svg index 9c661a81..e49dc5cf 100644 --- a/sample/hide_not_related_column/comments.svg +++ b/sample/hide_not_related_column/comments.svg @@ -31,17 +31,17 @@ posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] @@ -53,14 +53,14 @@ users - - -users - -[BASE TABLE] - -id -[int] + + +users +     +[BASE TABLE] + +id     +[int] @@ -72,23 +72,23 @@ logs - - -logs - -[BASE TABLE] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] + + +logs +     +[BASE TABLE] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] @@ -100,20 +100,20 @@ comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -comment_post_id -[bigint] - -comment_user_id -[int] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +comment_post_id     +[bigint] + +comment_user_id     +[int] diff --git a/sample/hide_not_related_column/logs.svg b/sample/hide_not_related_column/logs.svg index 9c2862f3..3da2decd 100644 --- a/sample/hide_not_related_column/logs.svg +++ b/sample/hide_not_related_column/logs.svg @@ -4,123 +4,123 @@ - + logs - + logs - - -logs -     -[BASE TABLE] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - + + +logs +     +[BASE TABLE] + +user_id +[int] + +post_id +[bigint] + +comment_id +[bigint] + +comment_star_id +[bigint] + users - - -users - -[BASE TABLE] - -id -[int] + + +users +     +[BASE TABLE] + +id     +[int] logs:user_id->users:id - - -logs->users + + +logs->users posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] logs:post_id->posts:id - - -Additional Relation + + +Additional Relation comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -comment_post_id -[bigint] - -comment_user_id -[int] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +comment_post_id     +[bigint] + +comment_user_id     +[int] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/hide_not_related_column/posts.svg b/sample/hide_not_related_column/posts.svg index 8f7e1590..d2b251ee 100644 --- a/sample/hide_not_related_column/posts.svg +++ b/sample/hide_not_related_column/posts.svg @@ -4,98 +4,98 @@ - + posts - + posts - - -posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - + + +posts +     +[BASE TABLE] + +id +[bigint] + +user_id +[int] + users - - -users - -[BASE TABLE] - -id -[int] + + +users +     +[BASE TABLE] + +id     +[int] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) logs - - -logs - -[BASE TABLE] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] + + +logs +     +[BASE TABLE] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] logs:post_id->posts:id - - -Additional Relation + + +Additional Relation diff --git a/sample/hide_not_related_column/schema.svg b/sample/hide_not_related_column/schema.svg index 52ecb154..bdaa32aa 100644 --- a/sample/hide_not_related_column/schema.svg +++ b/sample/hide_not_related_column/schema.svg @@ -4,11 +4,11 @@ - + testdb - + CamelizeTable @@ -21,195 +21,195 @@ comment_stars - - -comment_stars -     -[BASE TABLE] - -id -[bigint] - -comment_post_id -[bigint] - -comment_user_id -[int] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +comment_post_id     +[bigint] + +comment_user_id     +[int] comments - - -comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] comment_stars:comment_post_id->comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) users - - -users -     -[BASE TABLE] - -id -[int] + + +users +     +[BASE TABLE] + +id     +[int] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) posts - - -posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) hyphen-table - - -hyphen-table -     -[BASE TABLE] + + +hyphen-table +     +[BASE TABLE] logs - - -logs -     -[BASE TABLE] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] + + +logs +     +[BASE TABLE] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation logs:post_id->posts:id - - + + Additional Relation logs:user_id->users:id - - + + logs->users long_long_long_long_long_long_long_long_table_name - - -long_long_long_long_long_long_long_long_table_name -     -[BASE TABLE] + + +long_long_long_long_long_long_long_long_table_name +     +[BASE TABLE] post_comments - - -post_comments -     -[VIEW] + + +post_comments +     +[VIEW] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options -     -[BASE TABLE] - -user_id -[int] + + +user_options +     +[BASE TABLE] + +user_id     +[int] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/hide_not_related_column/user_options.svg b/sample/hide_not_related_column/user_options.svg index 65cb5517..c4c60434 100644 --- a/sample/hide_not_related_column/user_options.svg +++ b/sample/hide_not_related_column/user_options.svg @@ -25,20 +25,20 @@ users - - -users - -[BASE TABLE] - -id -[int] + + +users +     +[BASE TABLE] + +id     +[int] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/hide_not_related_column/users.svg b/sample/hide_not_related_column/users.svg index 7305d8be..6c44aa62 100644 --- a/sample/hide_not_related_column/users.svg +++ b/sample/hide_not_related_column/users.svg @@ -4,142 +4,142 @@ - + users - + users - - -users -     -[BASE TABLE] - -id -[int] - + + +users +     +[BASE TABLE] + +id +[int] + comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -comment_post_id -[bigint] - -comment_user_id -[int] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +comment_post_id     +[bigint] + +comment_user_id     +[int] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options - -[BASE TABLE] - -user_id -[int] + + +user_options +     +[BASE TABLE] + +user_id     +[int] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) logs - - -logs - -[BASE TABLE] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] + + +logs +     +[BASE TABLE] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] logs:user_id->users:id - - -logs->users + + +logs->users diff --git a/sample/mariadb/comment_stars.svg b/sample/mariadb/comment_stars.svg index c7e5ece3..006c6eff 100644 --- a/sample/mariadb/comment_stars.svg +++ b/sample/mariadb/comment_stars.svg @@ -40,32 +40,32 @@ comments - - -comments - -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -post_id_desc -[bigint(20)] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint(20)] + +post_id     +[bigint(20)] + +user_id     +[int(11)] + +comment     +[text] + +post_id_desc     +[bigint(20)] + +created     +[datetime] + +updated     +[datetime] @@ -77,29 +77,29 @@ users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] @@ -111,39 +111,39 @@ logs - - -logs - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/mariadb/comments.svg b/sample/mariadb/comments.svg index 4a2ed89f..e4605c35 100644 --- a/sample/mariadb/comments.svg +++ b/sample/mariadb/comments.svg @@ -4,183 +4,183 @@ - + comments - + comments - - -comments -     -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -post_id_desc -[bigint(20)] - -created -[datetime] - -updated -[datetime] - + + +comments +     +[BASE TABLE] + +id +[bigint(20)] + +post_id +[bigint(20)] + +user_id +[int(11)] + +comment +[text] + +post_id_desc +[bigint(20)] + +created +[datetime] + +updated +[datetime] + posts - - -posts - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) logs - - -logs - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -comment_post_id -[bigint(20)] - -comment_user_id -[int(11)] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +comment_post_id     +[bigint(20)] + +comment_user_id     +[int(11)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_post_id->comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) diff --git a/sample/mariadb/logs.svg b/sample/mariadb/logs.svg index 77cc093d..9a6b3de1 100644 --- a/sample/mariadb/logs.svg +++ b/sample/mariadb/logs.svg @@ -4,183 +4,183 @@ - + logs - + logs - - -logs -     -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] - + + +logs +     +[BASE TABLE] + +id +[bigint(20)] + +user_id +[int(11)] + +post_id +[bigint(20)] + +comment_id +[bigint(20)] + +comment_star_id +[bigint(20)] + +payload +[text] + +created +[datetime] + users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] logs:user_id->users:id - - -logs->users + + +logs->users posts - - -posts - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] logs:post_id->posts:id - - -Additional Relation + + +Additional Relation comments - - -comments - -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -post_id_desc -[bigint(20)] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint(20)] + +post_id     +[bigint(20)] + +user_id     +[int(11)] + +comment     +[text] + +post_id_desc     +[bigint(20)] + +created     +[datetime] + +updated     +[datetime] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -comment_post_id -[bigint(20)] - -comment_user_id -[int(11)] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +comment_post_id     +[bigint(20)] + +comment_user_id     +[int(11)] + +created     +[timestamp] + +updated     +[timestamp] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/mariadb/posts.svg b/sample/mariadb/posts.svg index 6a817978..7822e6c5 100644 --- a/sample/mariadb/posts.svg +++ b/sample/mariadb/posts.svg @@ -4,11 +4,11 @@ - + posts - + posts @@ -43,66 +43,66 @@ users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -post_id_desc -[bigint(20)] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint(20)] + +post_id     +[bigint(20)] + +user_id     +[int(11)] + +comment     +[text] + +post_id_desc     +[bigint(20)] + +created     +[datetime] + +updated     +[datetime] @@ -114,32 +114,32 @@ logs - - -logs - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] diff --git a/sample/mariadb/same_name_constraints.svg b/sample/mariadb/same_name_constraints.svg index 7ae4ad1e..703cac68 100644 --- a/sample/mariadb/same_name_constraints.svg +++ b/sample/mariadb/same_name_constraints.svg @@ -28,35 +28,35 @@ users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] same_name_constraints:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/mariadb/schema.svg b/sample/mariadb/schema.svg index 46951034..b8c4b1c7 100644 --- a/sample/mariadb/schema.svg +++ b/sample/mariadb/schema.svg @@ -4,25 +4,25 @@ - + testdb - + CamelizeTable - - -CamelizeTable -     -[BASE TABLE] - -id -[bigint(20)] - -created -[datetime] + + +CamelizeTable +     +[BASE TABLE] + +id     +[bigint(20)] + +created     +[datetime] @@ -33,56 +33,56 @@      [BASE TABLE] -id -[bigint(20)] +id     +[bigint(20)] -post_id -[bigint(20)] +post_id     +[bigint(20)] -user_id -[int(11)] +user_id     +[int(11)] -comment -[text] +comment     +[text] -post_id_desc -[bigint(20)] +post_id_desc     +[bigint(20)] -created -[datetime] +created     +[datetime] -updated -[datetime] +updated     +[datetime] posts - - -posts -     -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] @@ -94,35 +94,35 @@ users - - -users -     -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comments:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) @@ -134,23 +134,23 @@      [BASE TABLE] -id -[bigint(20)] +id     +[bigint(20)] -user_id -[int(11)] +user_id     +[int(11)] -comment_post_id -[bigint(20)] +comment_post_id     +[bigint(20)] -comment_user_id -[int(11)] +comment_user_id     +[int(11)] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] @@ -162,172 +162,172 @@ comment_stars:comment_user_id->users:id - - + + FOREIGN KEY (comment_user_id) REFERENCES users (id) hyphen-table - - -hyphen-table -     -[BASE TABLE] - -id -[bigint(20)] - -hyphen-column -[text] - -created -[datetime] + + +hyphen-table +     +[BASE TABLE] + +id     +[bigint(20)] + +hyphen-column     +[text] + +created     +[datetime] logs - - + + logs      [BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation logs:post_id->posts:id - - -Additional Relation + + +Additional Relation logs:user_id->users:id - - -logs->users + + +logs->users posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) post_comments - - -post_comments -     -[VIEW] - -id -[bigint(20)] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[datetime] - -updated -[datetime] + + +post_comments +     +[VIEW] + +id     +[bigint(20)] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[datetime] + +updated     +[datetime] same_name_constraints - - -same_name_constraints -     -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] + + +same_name_constraints +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] same_name_constraints:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options -     -[BASE TABLE] - -user_id -[int(11)] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int(11)] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/mariadb/user_options.svg b/sample/mariadb/user_options.svg index f27e1655..fcba2a57 100644 --- a/sample/mariadb/user_options.svg +++ b/sample/mariadb/user_options.svg @@ -34,35 +34,35 @@ users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/mariadb/users.svg b/sample/mariadb/users.svg index 0d839810..d9ac10c1 100644 --- a/sample/mariadb/users.svg +++ b/sample/mariadb/users.svg @@ -4,233 +4,233 @@ - + users - + users - - -users -     -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] - + + +users +     +[BASE TABLE] + +id +[int(11)] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp] + +updated +[timestamp] + comments - - -comments - -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -post_id_desc -[bigint(20)] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint(20)] + +post_id     +[bigint(20)] + +user_id     +[int(11)] + +comment     +[text] + +post_id_desc     +[bigint(20)] + +created     +[datetime] + +updated     +[datetime] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -comment_post_id -[bigint(20)] - -comment_user_id -[int(11)] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +comment_post_id     +[bigint(20)] + +comment_user_id     +[int(11)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) posts - - -posts - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) same_name_constraints - - -same_name_constraints - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] + + +same_name_constraints +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] same_name_constraints:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options - -[BASE TABLE] - -user_id -[int(11)] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int(11)] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) logs - - -logs - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] logs:user_id->users:id - - -logs->users + + +logs->users diff --git a/sample/mongo/schema.svg b/sample/mongo/schema.svg index bff5a7d3..8bf4a705 100644 --- a/sample/mongo/schema.svg +++ b/sample/mongo/schema.svg @@ -17,26 +17,26 @@      [collection] -_id -[objectId] +_id     +[objectId] -address -[document] +address     +[document] -borough -[string] +borough     +[string] -cuisine -[string] +cuisine     +[string] -grades -[array] +grades     +[array] -name -[string] +name     +[string] -restaurant_id -[string] +restaurant_id     +[string] diff --git a/sample/mssql/Rabbits.Running.svg b/sample/mssql/Rabbits.Running.svg index 9b74a8cc..5fb79413 100644 --- a/sample/mssql/Rabbits.Running.svg +++ b/sample/mssql/Rabbits.Running.svg @@ -4,50 +4,50 @@ - - + + Rabbits.Running - + Rabbits.Running - - -Rabbits.Running -     -[BASIC TABLE] - -LocationID -[int] - -ProductID -[int] - -EmployeeID -[int] - + + +Rabbits.Running +     +[BASIC TABLE] + +LocationID +[int] + +ProductID +[int] + +EmployeeID +[int] + Sales.Product - - -Sales.Product - -[BASIC TABLE] - -ProductID -[int] - -SalesPersonID -[int] + + +Sales.Product +     +[BASIC TABLE] + +ProductID     +[int] + +SalesPersonID     +[int] Rabbits.Running:ProductID->Sales.Product:SalesPersonID - - + + diff --git a/sample/mssql/Sales.Product.svg b/sample/mssql/Sales.Product.svg index 4821914e..87e79bad 100644 --- a/sample/mssql/Sales.Product.svg +++ b/sample/mssql/Sales.Product.svg @@ -4,50 +4,50 @@ - + Sales.Product - + Sales.Product - - -Sales.Product -     -[BASIC TABLE] - -ProductID -[int] - -SalesPersonID -[int] - + + +Sales.Product +     +[BASIC TABLE] + +ProductID +[int] + +SalesPersonID +[int] + Rabbits.Running - - -Rabbits.Running - -[BASIC TABLE] - -LocationID -[int] - -ProductID -[int] - -EmployeeID -[int] + + +Rabbits.Running +     +[BASIC TABLE] + +LocationID     +[int] + +ProductID     +[int] + +EmployeeID     +[int] Rabbits.Running:ProductID->Sales.Product:SalesPersonID - - + + diff --git a/sample/mssql/administrator.blogs.svg b/sample/mssql/administrator.blogs.svg index 20382c68..a5ae5cb3 100644 --- a/sample/mssql/administrator.blogs.svg +++ b/sample/mssql/administrator.blogs.svg @@ -4,71 +4,71 @@ - + administrator.blogs - + administrator.blogs - - -administrator.blogs -     -[BASIC TABLE] - -id -[int] - -user_id -[int] - -name -[text] - -description -[text] - -created -[date] - -updated -[date] - + + +administrator.blogs +     +[BASIC TABLE] + +id +[int] + +user_id +[int] + +name +[text] + +description +[text] + +created +[date] + +updated +[date] + users - - -users - -[BASIC TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[date] - -updated -[date] + + +users +     +[BASIC TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[date] + +updated     +[date] administrator.blogs:user_id->users:id - - + + diff --git a/sample/mssql/comment_stars.svg b/sample/mssql/comment_stars.svg index e8bf79fc..7a6c2cd5 100644 --- a/sample/mssql/comment_stars.svg +++ b/sample/mssql/comment_stars.svg @@ -4,141 +4,141 @@ - + comment_stars - + comment_stars - - -comment_stars -     -[BASIC TABLE] - -id -[int] - -user_id -[int] - -comment_post_id -[int] - -comment_user_id -[int] - -created -[date] - -updated -[date] - + + +comment_stars +     +[BASIC TABLE] + +id +[int] + +user_id +[int] + +comment_post_id +[int] + +comment_user_id +[int] + +created +[date] + +updated +[date] + comments - - -comments - -[BASIC TABLE] - -id -[int] - -post_id -[int] - -user_id -[int] - -comment -[text] - -created -[date] - -updated -[date] + + +comments +     +[BASIC TABLE] + +id     +[int] + +post_id     +[int] + +user_id     +[int] + +comment     +[text] + +created     +[date] + +updated     +[date] comment_stars:comment_post_id->comments:post_id - - + + users - - -users - -[BASIC TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[date] - -updated -[date] + + +users +     +[BASIC TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[date] + +updated     +[date] comment_stars:comment_user_id->users:id - - + + logs - - -logs - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -post_id -[int] - -comment_id -[int] - -comment_star_id -[int] - -payload -[text] - -created -[date] + + +logs +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +post_id     +[int] + +comment_id     +[int] + +comment_star_id     +[int] + +payload     +[text] + +created     +[date] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/mssql/comments.svg b/sample/mssql/comments.svg index 7d962f01..9adc0135 100644 --- a/sample/mssql/comments.svg +++ b/sample/mssql/comments.svg @@ -4,174 +4,174 @@ - + comments - + comments - - -comments -     -[BASIC TABLE] - -id -[int] - -post_id -[int] - -user_id -[int] - -comment -[text] - -created -[date] - -updated -[date] - + + +comments +     +[BASIC TABLE] + +id +[int] + +post_id +[int] + +user_id +[int] + +comment +[text] + +created +[date] + +updated +[date] + posts - - -posts - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -created -[date] - -updated -[date] + + +posts +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +created     +[date] + +updated     +[date] comments:post_id->posts:id - - + + users - - -users - -[BASIC TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[date] - -updated -[date] + + +users +     +[BASIC TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[date] + +updated     +[date] comments:user_id->users:id - - + + logs - - -logs - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -post_id -[int] - -comment_id -[int] - -comment_star_id -[int] - -payload -[text] - -created -[date] + + +logs +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +post_id     +[int] + +comment_id     +[int] + +comment_star_id     +[int] + +payload     +[text] + +created     +[date] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -comment_post_id -[int] - -comment_user_id -[int] - -created -[date] - -updated -[date] + + +comment_stars +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +comment_post_id     +[int] + +comment_user_id     +[int] + +created     +[date] + +updated     +[date] comment_stars:comment_post_id->comments:post_id - - + + diff --git a/sample/mssql/logs.svg b/sample/mssql/logs.svg index 8b5dcfcf..aae66648 100644 --- a/sample/mssql/logs.svg +++ b/sample/mssql/logs.svg @@ -4,177 +4,177 @@ - + logs - + logs - - -logs -     -[BASIC TABLE] - -id -[int] - -user_id -[int] - -post_id -[int] - -comment_id -[int] - -comment_star_id -[int] - -payload -[text] - -created -[date] - + + +logs +     +[BASIC TABLE] + +id +[int] + +user_id +[int] + +post_id +[int] + +comment_id +[int] + +comment_star_id +[int] + +payload +[text] + +created +[date] + users - - -users - -[BASIC TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[date] - -updated -[date] + + +users +     +[BASIC TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[date] + +updated     +[date] logs:user_id->users:id - - -logs->users + + +logs->users posts - - -posts - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -created -[date] - -updated -[date] + + +posts +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +created     +[date] + +updated     +[date] logs:post_id->posts:id - - -Additional Relation + + +Additional Relation comments - - -comments - -[BASIC TABLE] - -id -[int] - -post_id -[int] - -user_id -[int] - -comment -[text] - -created -[date] - -updated -[date] + + +comments +     +[BASIC TABLE] + +id     +[int] + +post_id     +[int] + +user_id     +[int] + +comment     +[text] + +created     +[date] + +updated     +[date] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -comment_post_id -[int] - -comment_user_id -[int] - -created -[date] - -updated -[date] + + +comment_stars +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +comment_post_id     +[int] + +comment_user_id     +[int] + +created     +[date] + +updated     +[date] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/mssql/posts.svg b/sample/mssql/posts.svg index 9c82748f..67126375 100644 --- a/sample/mssql/posts.svg +++ b/sample/mssql/posts.svg @@ -4,141 +4,141 @@ - + posts - + posts - - -posts -     -[BASIC TABLE] - -id -[int] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -created -[date] - -updated -[date] - + + +posts +     +[BASIC TABLE] + +id +[int] + +user_id +[int] + +title +[varchar(255)] + +body +[text] + +created +[date] + +updated +[date] + users - - -users - -[BASIC TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[date] - -updated -[date] + + +users +     +[BASIC TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[date] + +updated     +[date] posts:user_id->users:id - - + + comments - - -comments - -[BASIC TABLE] - -id -[int] - -post_id -[int] - -user_id -[int] - -comment -[text] - -created -[date] - -updated -[date] + + +comments +     +[BASIC TABLE] + +id     +[int] + +post_id     +[int] + +user_id     +[int] + +comment     +[text] + +created     +[date] + +updated     +[date] comments:post_id->posts:id - - + + logs - - -logs - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -post_id -[int] - -comment_id -[int] - -comment_star_id -[int] - -payload -[text] - -created -[date] + + +logs +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +post_id     +[int] + +comment_id     +[int] + +comment_star_id     +[int] + +payload     +[text] + +created     +[date] logs:post_id->posts:id - - -Additional Relation + + +Additional Relation diff --git a/sample/mssql/schema.svg b/sample/mssql/schema.svg index 99039076..00c04cf1 100644 --- a/sample/mssql/schema.svg +++ b/sample/mssql/schema.svg @@ -4,11 +4,11 @@ - + testdb - + users @@ -18,23 +18,23 @@      [BASIC TABLE] -id -[int] +id     +[int] -username -[varchar(50)] +username     +[varchar(50)] -password -[varchar(50)] +password     +[varchar(50)] -email -[varchar(355)] +email     +[varchar(355)] -created -[date] +created     +[date] -updated -[date] +updated     +[date] @@ -45,17 +45,17 @@      [BASIC TABLE] -user_id -[int] +user_id     +[int] -show_email -[bit] +show_email     +[bit] -created -[date] +created     +[date] -updated -[date] +updated     +[date] @@ -72,23 +72,23 @@      [BASIC TABLE] -id -[int] +id     +[int] -user_id -[int] +user_id     +[int] -title -[varchar(255)] +title     +[varchar(255)] -body -[text] +body     +[text] -created -[date] +created     +[date] -updated -[date] +updated     +[date] @@ -105,23 +105,23 @@      [BASIC TABLE] -id -[int] +id     +[int] -post_id -[int] +post_id     +[int] -user_id -[int] +user_id     +[int] -comment -[text] +comment     +[text] -created -[date] +created     +[date] -updated -[date] +updated     +[date] @@ -144,23 +144,23 @@      [BASIC TABLE] -id -[int] +id     +[int] -user_id -[int] +user_id     +[int] -comment_post_id -[int] +comment_post_id     +[int] -comment_user_id -[int] +comment_user_id     +[int] -created -[date] +created     +[date] -updated -[date] +updated     +[date] @@ -183,26 +183,26 @@      [BASIC TABLE] -id -[int] +id     +[int] -user_id -[int] +user_id     +[int] -post_id -[int] +post_id     +[int] -comment_id -[int] +comment_id     +[int] -comment_star_id -[int] +comment_star_id     +[int] -payload -[text] +payload     +[text] -created -[date] +created     +[date] @@ -235,65 +235,65 @@ post_comments - - -post_comments -     -[VIEW] - -id -[int] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[date] - -updated -[date] + + +post_comments +     +[VIEW] + +id     +[int] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[date] + +updated     +[date] CamelizeTable - - -CamelizeTable -     -[BASIC TABLE] - -id -[int] - -created -[date] + + +CamelizeTable +     +[BASIC TABLE] + +id     +[int] + +created     +[date] hyphen-table - - -hyphen-table -     -[BASIC TABLE] - -id -[int] - -hyphen-column -[text] - -created -[date] + + +hyphen-table +     +[BASIC TABLE] + +id     +[int] + +hyphen-column     +[text] + +created     +[date] @@ -304,23 +304,23 @@      [BASIC TABLE] -id -[int] +id     +[int] -user_id -[int] +user_id     +[int] -name -[text] +name     +[text] -description -[text] +description     +[text] -created -[date] +created     +[date] -updated -[date] +updated     +[date] @@ -331,53 +331,53 @@ name with spaces - - -name with spaces -     -[VIEW] - -title -[varchar(255)] + + +name with spaces +     +[VIEW] + +title     +[varchar(255)] Sales.Product - - -Sales.Product -     -[BASIC TABLE] - -ProductID -[int] - -SalesPersonID -[int] + + +Sales.Product +     +[BASIC TABLE] + +ProductID     +[int] + +SalesPersonID     +[int] Rabbits.Running - - -Rabbits.Running -     -[BASIC TABLE] - -LocationID -[int] - -ProductID -[int] - -EmployeeID -[int] + + +Rabbits.Running +     +[BASIC TABLE] + +LocationID     +[int] + +ProductID     +[int] + +EmployeeID     +[int] Rabbits.Running:ProductID->Sales.Product:SalesPersonID - - + + diff --git a/sample/mssql/user_options.svg b/sample/mssql/user_options.svg index 3b9aba2b..bfd24eb0 100644 --- a/sample/mssql/user_options.svg +++ b/sample/mssql/user_options.svg @@ -4,65 +4,65 @@ - + user_options - + user_options - - -user_options -     -[BASIC TABLE] - -user_id -[int] - -show_email -[bit] - -created -[date] - -updated -[date] - + + +user_options +     +[BASIC TABLE] + +user_id +[int] + +show_email +[bit] + +created +[date] + +updated +[date] + users - - -users - -[BASIC TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[date] - -updated -[date] + + +users +     +[BASIC TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[date] + +updated     +[date] user_options:user_id->users:id - - + + diff --git a/sample/mssql/users.svg b/sample/mssql/users.svg index 0937af3e..ae23dd1d 100644 --- a/sample/mssql/users.svg +++ b/sample/mssql/users.svg @@ -4,234 +4,234 @@ - + users - + users - - -users -     -[BASIC TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[date] - -updated -[date] - + + +users +     +[BASIC TABLE] + +id +[int] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[date] + +updated +[date] + user_options - - -user_options - -[BASIC TABLE] - -user_id -[int] - -show_email -[bit] - -created -[date] - -updated -[date] + + +user_options +     +[BASIC TABLE] + +user_id     +[int] + +show_email     +[bit] + +created     +[date] + +updated     +[date] user_options:user_id->users:id - - + + posts - - -posts - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -created -[date] - -updated -[date] + + +posts +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +created     +[date] + +updated     +[date] posts:user_id->users:id - - + + comments - - -comments - -[BASIC TABLE] - -id -[int] - -post_id -[int] - -user_id -[int] - -comment -[text] - -created -[date] - -updated -[date] + + +comments +     +[BASIC TABLE] + +id     +[int] + +post_id     +[int] + +user_id     +[int] + +comment     +[text] + +created     +[date] + +updated     +[date] comments:user_id->users:id - - + + comment_stars - - -comment_stars - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -comment_post_id -[int] - -comment_user_id -[int] - -created -[date] - -updated -[date] + + +comment_stars +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +comment_post_id     +[int] + +comment_user_id     +[int] + +created     +[date] + +updated     +[date] comment_stars:comment_user_id->users:id - - + + administrator.blogs - - -administrator.blogs - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -name -[text] - -description -[text] - -created -[date] - -updated -[date] + + +administrator.blogs +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +name     +[text] + +description     +[text] + +created     +[date] + +updated     +[date] administrator.blogs:user_id->users:id - - + + logs - - -logs - -[BASIC TABLE] - -id -[int] - -user_id -[int] - -post_id -[int] - -comment_id -[int] - -comment_star_id -[int] - -payload -[text] - -created -[date] + + +logs +     +[BASIC TABLE] + +id     +[int] + +user_id     +[int] + +post_id     +[int] + +comment_id     +[int] + +comment_star_id     +[int] + +payload     +[text] + +created     +[date] logs:user_id->users:id - - -logs->users + + +logs->users diff --git a/sample/mysql/comment_stars.svg b/sample/mysql/comment_stars.svg index 189f8486..ca64597b 100644 --- a/sample/mysql/comment_stars.svg +++ b/sample/mysql/comment_stars.svg @@ -40,32 +40,32 @@ comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] @@ -77,29 +77,29 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] @@ -111,39 +111,39 @@ logs - - -logs - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/mysql/comments.svg b/sample/mysql/comments.svg index 7f17cb8e..655a5393 100644 --- a/sample/mysql/comments.svg +++ b/sample/mysql/comments.svg @@ -4,183 +4,183 @@ - + comments - + comments - - -comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] - + + +comments +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[int] + +comment +[text] + +post_id_desc +[bigint] + +created +[datetime] + +updated +[datetime] + posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) logs - - -logs - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_post_id->comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) diff --git a/sample/mysql/logs.svg b/sample/mysql/logs.svg index 406f2b11..6ea88a11 100644 --- a/sample/mysql/logs.svg +++ b/sample/mysql/logs.svg @@ -4,183 +4,183 @@ - + logs - + logs - - -logs -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] - + + +logs +     +[BASE TABLE] + +id +[bigint] + +user_id +[int] + +post_id +[bigint] + +comment_id +[bigint] + +comment_star_id +[bigint] + +payload +[text] + +created +[datetime] + users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] logs:user_id->users:id - - -logs->users + + +logs->users posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] logs:post_id->posts:id - - -Additional Relation + + +Additional Relation comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/mysql/posts.svg b/sample/mysql/posts.svg index e8175bb8..fd047b40 100644 --- a/sample/mysql/posts.svg +++ b/sample/mysql/posts.svg @@ -4,11 +4,11 @@ - + posts - + posts @@ -43,66 +43,66 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] @@ -114,32 +114,32 @@ logs - - -logs - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] diff --git a/sample/mysql/schema.svg b/sample/mysql/schema.svg index daa77af6..d02ec02b 100644 --- a/sample/mysql/schema.svg +++ b/sample/mysql/schema.svg @@ -4,11 +4,11 @@ - + testdb - + CamelizeTable @@ -18,309 +18,309 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -created -[datetime] +created     +[datetime] comment_stars - - -comment_stars -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comments - - -comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comment_stars:comment_post_id->comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) users - - -users -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) posts - - -posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) hyphen-table - - -hyphen-table -     -[BASE TABLE] - -id -[bigint] - -hyphen-column -[text] - -created -[datetime] + + +hyphen-table +     +[BASE TABLE] + +id     +[bigint] + +hyphen-column     +[text] + +created     +[datetime] logs - - -logs -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation logs:post_id->posts:id - - + + Additional Relation logs:user_id->users:id - - + + logs->users long_long_long_long_long_long_long_long_table_name - - -long_long_long_long_long_long_long_long_table_name -     -[BASE TABLE] - -id -[bigint] - -created -[datetime] + + +long_long_long_long_long_long_long_long_table_name +     +[BASE TABLE] + +id     +[bigint] + +created     +[datetime] post_comments - - -post_comments -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[datetime] - -updated -[datetime] + + +post_comments +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options -     -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/mysql/user_options.svg b/sample/mysql/user_options.svg index f13acdf2..eef6f004 100644 --- a/sample/mysql/user_options.svg +++ b/sample/mysql/user_options.svg @@ -34,35 +34,35 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/mysql/users.svg b/sample/mysql/users.svg index 084c7f7c..c2309a31 100644 --- a/sample/mysql/users.svg +++ b/sample/mysql/users.svg @@ -4,211 +4,211 @@ - + users - + users - - -users -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] - + + +users +     +[BASE TABLE] + +id +[int] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp] + +updated +[timestamp] + comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options - -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) logs - - -logs - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] logs:user_id->users:id - - -logs->users + + +logs->users diff --git a/sample/mysql56/comment_stars.svg b/sample/mysql56/comment_stars.svg index f155d297..237d8c6c 100644 --- a/sample/mysql56/comment_stars.svg +++ b/sample/mysql56/comment_stars.svg @@ -40,29 +40,29 @@ comments - - -comments - -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint(20)] + +post_id     +[bigint(20)] + +user_id     +[int(11)] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] @@ -74,29 +74,29 @@ users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] @@ -108,39 +108,39 @@ logs - - -logs - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/mysql56/comments.svg b/sample/mysql56/comments.svg index adf5b72c..a042c766 100644 --- a/sample/mysql56/comments.svg +++ b/sample/mysql56/comments.svg @@ -4,180 +4,180 @@ - + comments - + comments - - -comments -     -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -created -[datetime] - -updated -[datetime] - + + +comments +     +[BASE TABLE] + +id +[bigint(20)] + +post_id +[bigint(20)] + +user_id +[int(11)] + +comment +[text] + +created +[datetime] + +updated +[datetime] + posts - - -posts - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) logs - - -logs - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -comment_post_id -[bigint(20)] - -comment_user_id -[int(11)] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +comment_post_id     +[bigint(20)] + +comment_user_id     +[int(11)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_post_id->comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) diff --git a/sample/mysql56/logs.svg b/sample/mysql56/logs.svg index ccf5b82e..868f387f 100644 --- a/sample/mysql56/logs.svg +++ b/sample/mysql56/logs.svg @@ -4,180 +4,180 @@ - + logs - + logs - - -logs -     -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] - + + +logs +     +[BASE TABLE] + +id +[bigint(20)] + +user_id +[int(11)] + +post_id +[bigint(20)] + +comment_id +[bigint(20)] + +comment_star_id +[bigint(20)] + +payload +[text] + +created +[datetime] + users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] logs:user_id->users:id - - -logs->users + + +logs->users posts - - -posts - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] logs:post_id->posts:id - - -Additional Relation + + +Additional Relation comments - - -comments - -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint(20)] + +post_id     +[bigint(20)] + +user_id     +[int(11)] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -comment_post_id -[bigint(20)] - -comment_user_id -[int(11)] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +comment_post_id     +[bigint(20)] + +comment_user_id     +[int(11)] + +created     +[timestamp] + +updated     +[timestamp] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/mysql56/posts.svg b/sample/mysql56/posts.svg index 90cfee59..95524316 100644 --- a/sample/mysql56/posts.svg +++ b/sample/mysql56/posts.svg @@ -4,11 +4,11 @@ - + posts - + posts @@ -43,63 +43,63 @@ users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint(20)] + +post_id     +[bigint(20)] + +user_id     +[int(11)] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] @@ -111,32 +111,32 @@ logs - - -logs - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] diff --git a/sample/mysql56/schema.svg b/sample/mysql56/schema.svg index d1ce4625..54b0ffe5 100644 --- a/sample/mysql56/schema.svg +++ b/sample/mysql56/schema.svg @@ -4,25 +4,25 @@ - + testdb - + CamelizeTable - - -CamelizeTable -     -[BASE TABLE] - -id -[bigint(20)] - -created -[datetime] + + +CamelizeTable +     +[BASE TABLE] + +id     +[bigint(20)] + +created     +[datetime] @@ -33,23 +33,23 @@      [BASE TABLE] -id -[bigint(20)] +id     +[bigint(20)] -user_id -[int(11)] +user_id     +[int(11)] -comment_post_id -[bigint(20)] +comment_post_id     +[bigint(20)] -comment_user_id -[int(11)] +comment_user_id     +[int(11)] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] @@ -60,23 +60,23 @@      [BASE TABLE] -id -[bigint(20)] +id     +[bigint(20)] -post_id -[bigint(20)] +post_id     +[bigint(20)] -user_id -[int(11)] +user_id     +[int(11)] -comment -[text] +comment     +[text] -created -[datetime] +created     +[datetime] -updated -[datetime] +updated     +[datetime] @@ -88,66 +88,66 @@ users - - -users -     -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - - + + FOREIGN KEY (comment_user_id) REFERENCES users (id) posts - - -posts -     -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] @@ -159,150 +159,150 @@ comments:user_id->users:id - + FOREIGN KEY (user_id) REFERENCES users (id) hyphen-table - - -hyphen-table -     -[BASE TABLE] - -id -[bigint(20)] - -hyphen-column -[text] - -created -[datetime] + + +hyphen-table +     +[BASE TABLE] + +id     +[bigint(20)] + +hyphen-column     +[text] + +created     +[datetime] logs - - + + logs      [BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation logs:post_id->posts:id - - -Additional Relation + + +Additional Relation logs:user_id->users:id - - -logs->users + + +logs->users post_comments - - -post_comments -     -[VIEW] - -id -[bigint(20)] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[datetime] - -updated -[datetime] + + +post_comments +     +[VIEW] + +id     +[bigint(20)] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options -     -[BASE TABLE] - -user_id -[int(11)] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int(11)] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/mysql56/user_options.svg b/sample/mysql56/user_options.svg index f27e1655..fcba2a57 100644 --- a/sample/mysql56/user_options.svg +++ b/sample/mysql56/user_options.svg @@ -34,35 +34,35 @@ users - - -users - -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int(11)] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/mysql56/users.svg b/sample/mysql56/users.svg index 894b761d..9a4e5a5a 100644 --- a/sample/mysql56/users.svg +++ b/sample/mysql56/users.svg @@ -4,208 +4,208 @@ - + users - + users - - -users -     -[BASE TABLE] - -id -[int(11)] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] - + + +users +     +[BASE TABLE] + +id +[int(11)] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp] + +updated +[timestamp] + comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -comment_post_id -[bigint(20)] - -comment_user_id -[int(11)] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +comment_post_id     +[bigint(20)] + +comment_user_id     +[int(11)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint(20)] - -post_id -[bigint(20)] - -user_id -[int(11)] - -comment -[text] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint(20)] + +post_id     +[bigint(20)] + +user_id     +[int(11)] + +comment     +[text] + +created     +[datetime] + +updated     +[datetime] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) posts - - -posts - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options - -[BASE TABLE] - -user_id -[int(11)] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int(11)] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) logs - - -logs - -[BASE TABLE] - -id -[bigint(20)] - -user_id -[int(11)] - -post_id -[bigint(20)] - -comment_id -[bigint(20)] - -comment_star_id -[bigint(20)] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint(20)] + +user_id     +[int(11)] + +post_id     +[bigint(20)] + +comment_id     +[bigint(20)] + +comment_star_id     +[bigint(20)] + +payload     +[text] + +created     +[datetime] logs:user_id->users:id - - -logs->users + + +logs->users diff --git a/sample/number/comment_stars.svg b/sample/number/comment_stars.svg index 630f95ae..456c4922 100644 --- a/sample/number/comment_stars.svg +++ b/sample/number/comment_stars.svg @@ -40,32 +40,32 @@ comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] @@ -77,29 +77,29 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] diff --git a/sample/number/comments.svg b/sample/number/comments.svg index fe7d8d06..e01945d3 100644 --- a/sample/number/comments.svg +++ b/sample/number/comments.svg @@ -4,146 +4,146 @@ - + comments - + comments - - -comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] - + + +comments +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[int] + +comment +[text] + +post_id_desc +[bigint] + +created +[datetime] + +updated +[datetime] + posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_post_id->comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) diff --git a/sample/number/posts.svg b/sample/number/posts.svg index 0c40c34c..df99fdc6 100644 --- a/sample/number/posts.svg +++ b/sample/number/posts.svg @@ -43,73 +43,73 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comments:post_id->posts:id - - -FOREIGN KEY (post_id) REFERENCES posts (id) + + +FOREIGN KEY (post_id) REFERENCES posts (id) diff --git a/sample/number/schema.svg b/sample/number/schema.svg index 850d7fa9..4870e3d7 100644 --- a/sample/number/schema.svg +++ b/sample/number/schema.svg @@ -4,11 +4,11 @@ - + testdb - + CamelizeTable @@ -18,11 +18,11 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -created -[datetime] +created     +[datetime] @@ -33,23 +33,23 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -user_id -[int] +user_id     +[int] -comment_post_id -[bigint] +comment_post_id     +[bigint] -comment_user_id -[int] +comment_user_id     +[int] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] @@ -60,26 +60,26 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -post_id -[bigint] +post_id     +[bigint] -user_id -[int] +user_id     +[int] -comment -[text] +comment     +[text] -post_id_desc -[bigint] +post_id_desc     +[bigint] -created -[datetime] +created     +[datetime] -updated -[datetime] +updated     +[datetime] @@ -91,66 +91,66 @@ users - - + + users      [BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - + FOREIGN KEY (comment_user_id) REFERENCES users (id) posts - - -posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] @@ -162,8 +162,8 @@ comments:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) @@ -175,95 +175,95 @@      [BASE TABLE] -id -[bigint] +id     +[bigint] -hyphen-column -[text] +hyphen-column     +[text] -created -[datetime] +created     +[datetime] logs - - -logs -     -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[bigint] - -payload -[text] - -created -[datetime] + + +logs +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[bigint] + +payload     +[text] + +created     +[datetime] long_long_long_long_long_long_long_long_table_name - - -long_long_long_long_long_long_long_long_table_name -     -[BASE TABLE] - -id -[bigint] - -created -[datetime] + + +long_long_long_long_long_long_long_long_table_name +     +[BASE TABLE] + +id     +[bigint] + +created     +[datetime] post_comments - - -post_comments -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[datetime] - -updated -[datetime] + + +post_comments +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) @@ -275,23 +275,23 @@      [BASE TABLE] -user_id -[int] +user_id     +[int] -show_email -[tinyint(1)] +show_email     +[tinyint(1)] -created -[timestamp] +created     +[timestamp] -updated -[timestamp] +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/number/user_options.svg b/sample/number/user_options.svg index f13acdf2..eef6f004 100644 --- a/sample/number/user_options.svg +++ b/sample/number/user_options.svg @@ -34,35 +34,35 @@ users - - -users - -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] + + +users +     +[BASE TABLE] + +id     +[int] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/number/users.svg b/sample/number/users.svg index 694fd861..ef4ca9cb 100644 --- a/sample/number/users.svg +++ b/sample/number/users.svg @@ -4,174 +4,174 @@ - + users - + users - - -users -     -[BASE TABLE] - -id -[int] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp] - -updated -[timestamp] - + + +users +     +[BASE TABLE] + +id +[int] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp] + +updated +[timestamp] + comment_stars - - -comment_stars - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -comment_post_id -[bigint] - -comment_user_id -[int] - -created -[timestamp] - -updated -[timestamp] + + +comment_stars +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +comment_post_id     +[bigint] + +comment_user_id     +[int] + +created     +[timestamp] + +updated     +[timestamp] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) comments - - -comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[int] - -comment -[text] - -post_id_desc -[bigint] - -created -[datetime] - -updated -[datetime] + + +comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[int] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[datetime] + +updated     +[datetime] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) posts - - -posts - -[BASE TABLE] - -id -[bigint] - -user_id -[int] - -title -[varchar(255)] - -body -[text] - -post_type -[enum('public','private','draft')] - -created -[datetime] - -updated -[datetime] + + +posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[int] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[enum('public','private','draft')] + +created     +[datetime] + +updated     +[datetime] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) user_options - - -user_options - -[BASE TABLE] - -user_id -[int] - -show_email -[tinyint(1)] - -created -[timestamp] - -updated -[timestamp] + + +user_options +     +[BASE TABLE] + +user_id     +[int] + +show_email     +[tinyint(1)] + +created     +[timestamp] + +updated     +[timestamp] user_options:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) + + +FOREIGN KEY (user_id) REFERENCES users (id) diff --git a/sample/png/comment_stars.png b/sample/png/comment_stars.png index 89422c56..d3b760c6 100644 Binary files a/sample/png/comment_stars.png and b/sample/png/comment_stars.png differ diff --git a/sample/png/comments.png b/sample/png/comments.png index 7f0d649c..165d9ac1 100644 Binary files a/sample/png/comments.png and b/sample/png/comments.png differ diff --git a/sample/png/logs.png b/sample/png/logs.png index a7f1a3ce..3fa9ae6d 100644 Binary files a/sample/png/logs.png and b/sample/png/logs.png differ diff --git a/sample/png/posts.png b/sample/png/posts.png index 33c2a227..9c88e9ad 100644 Binary files a/sample/png/posts.png and b/sample/png/posts.png differ diff --git a/sample/png/schema.png b/sample/png/schema.png index 28016b03..85ef2428 100644 Binary files a/sample/png/schema.png and b/sample/png/schema.png differ diff --git a/sample/png/user_options.png b/sample/png/user_options.png index 72b5c114..dd7aa563 100644 Binary files a/sample/png/user_options.png and b/sample/png/user_options.png differ diff --git a/sample/png/users.png b/sample/png/users.png index 5f9b17ce..582197f7 100644 Binary files a/sample/png/users.png and b/sample/png/users.png differ diff --git a/sample/postgres/README.md b/sample/postgres/README.md index 35b68f44..7c129e94 100644 --- a/sample/postgres/README.md +++ b/sample/postgres/README.md @@ -29,6 +29,7 @@ Sample PostgreSQL database document. | Name | ReturnType | Arguments | Type | | ---- | ------- | ------- | ---- | +| public.reset_comment | void | IN comment_id integer | PROCEDURE | | public.uuid_nil | uuid | | FUNCTION | | public.uuid_ns_dns | uuid | | FUNCTION | | public.uuid_ns_url | uuid | | FUNCTION | @@ -40,7 +41,6 @@ Sample PostgreSQL database document. | public.uuid_generate_v4 | uuid | | FUNCTION | | public.uuid_generate_v5 | uuid | namespace uuid, name text | FUNCTION | | public.update_updated | trigger | | FUNCTION | -| public.reset_comment | void | IN comment_id integer | PROCEDURE | ## Relations diff --git a/sample/postgres/administrator.blogs.svg b/sample/postgres/administrator.blogs.svg index 867b67ae..504935c3 100644 --- a/sample/postgres/administrator.blogs.svg +++ b/sample/postgres/administrator.blogs.svg @@ -40,35 +40,35 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] administrator.blogs:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE diff --git a/sample/postgres/backup.blog_options.svg b/sample/postgres/backup.blog_options.svg index 2243bdf3..858a77bc 100644 --- a/sample/postgres/backup.blog_options.svg +++ b/sample/postgres/backup.blog_options.svg @@ -34,32 +34,32 @@ backup.blogs - - -backup.blogs - -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -dump -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +backup.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +dump     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] backup.blog_options:blog_id->backup.blogs:id - - + + FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE diff --git a/sample/postgres/backup.blogs.svg b/sample/postgres/backup.blogs.svg index c0728a48..5a3cc1ea 100644 --- a/sample/postgres/backup.blogs.svg +++ b/sample/postgres/backup.blogs.svg @@ -4,62 +4,62 @@ - + backup.blogs - + backup.blogs - - -backup.blogs -     -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -dump -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] - + + +backup.blogs +     +[BASE TABLE] + +id +[integer] + +user_id +[integer] + +dump +[text] + +created +[timestamp without time zone] + +updated +[timestamp without time zone] + backup.blog_options - - -backup.blog_options - -[BASE TABLE] - -id -[integer] - -blog_id -[integer] - -label -[text] - -updated -[timestamp without time zone] + + +backup.blog_options +     +[BASE TABLE] + +id     +[integer] + +blog_id     +[integer] + +label     +[text] + +updated     +[timestamp without time zone] backup.blog_options:blog_id->backup.blogs:id - - + + FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE diff --git a/sample/postgres/public.CamelizeTable.svg b/sample/postgres/public.CamelizeTable.svg index 1b5091bd..d3df0025 100644 --- a/sample/postgres/public.CamelizeTable.svg +++ b/sample/postgres/public.CamelizeTable.svg @@ -4,53 +4,53 @@ - + public.CamelizeTable - + public.CamelizeTable - - -public.CamelizeTable -     -[BASE TABLE] - -id -[uuid] - -created -[timestamp without time zone] - + + +public.CamelizeTable +     +[BASE TABLE] + +id +[uuid] + +created +[timestamp without time zone] + public.hyphen-table - - -public.hyphen-table - -[BASE TABLE] - -id -[uuid] - -hyphen-column -[text] - -CamelizeTableId -[uuid] - -created -[timestamp without time zone] + + +public.hyphen-table +     +[BASE TABLE] + +id     +[uuid] + +hyphen-column     +[text] + +CamelizeTableId     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table:CamelizeTableId->public.CamelizeTable:id - - + + FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE diff --git a/sample/postgres/public.comment_stars.svg b/sample/postgres/public.comment_stars.svg index 5847fd3e..526c1cab 100644 --- a/sample/postgres/public.comment_stars.svg +++ b/sample/postgres/public.comment_stars.svg @@ -40,32 +40,32 @@ public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -77,29 +77,29 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -111,39 +111,39 @@ public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:comment_star_id->public.comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/postgres/public.comments.svg b/sample/postgres/public.comments.svg index 49fc2a4c..dbdee89a 100644 --- a/sample/postgres/public.comments.svg +++ b/sample/postgres/public.comments.svg @@ -4,186 +4,186 @@ - + public.comments - + public.comments - - -public.comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] - + + +public.comments +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[integer] + +comment +[text] + +post_id_desc +[bigint] + +created +[timestamp without time zone] + +updated +[timestamp without time zone] + public.posts - - -public.posts - -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:post_id->public.posts:id - - -FOREIGN KEY (post_id) REFERENCES posts(id) + + +FOREIGN KEY (post_id) REFERENCES posts(id) public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) + + +FOREIGN KEY (user_id) REFERENCES users(id) public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:comment_id->public.comments:id - - -Additional Relation + + +Additional Relation public.comment_stars - - -public.comment_stars - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -comment_post_id -[bigint] - -comment_user_id -[integer] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comment_stars +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +comment_post_id     +[bigint] + +comment_user_id     +[integer] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comment_stars:comment_post_id->public.comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id) diff --git a/sample/postgres/public.hyphen-table.svg b/sample/postgres/public.hyphen-table.svg index 37d46bc5..e4f01fe9 100644 --- a/sample/postgres/public.hyphen-table.svg +++ b/sample/postgres/public.hyphen-table.svg @@ -4,11 +4,11 @@ - + public.hyphen-table - + public.hyphen-table @@ -34,23 +34,23 @@ public.CamelizeTable - - -public.CamelizeTable - -[BASE TABLE] - -id -[uuid] - -created -[timestamp without time zone] + + +public.CamelizeTable +     +[BASE TABLE] + +id     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table:CamelizeTableId->public.CamelizeTable:id - - + + FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE diff --git a/sample/postgres/public.logs.svg b/sample/postgres/public.logs.svg index e6014280..752501d6 100644 --- a/sample/postgres/public.logs.svg +++ b/sample/postgres/public.logs.svg @@ -4,186 +4,186 @@ - + public.logs - + public.logs - - -public.logs -     -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] - + + +public.logs +     +[BASE TABLE] + +id +[uuid] + +user_id +[integer] + +post_id +[bigint] + +comment_id +[bigint] + +comment_star_id +[uuid] + +payload +[text] + +created +[timestamp without time zone] + public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:user_id->public.users:id - - -logs->users + + +logs->users public.posts - - -public.posts - -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:post_id->public.posts:id - - -Additional Relation + + +Additional Relation public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:comment_id->public.comments:id - - -Additional Relation + + +Additional Relation public.comment_stars - - -public.comment_stars - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -comment_post_id -[bigint] - -comment_user_id -[integer] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comment_stars +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +comment_post_id     +[bigint] + +comment_user_id     +[integer] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:comment_star_id->public.comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/postgres/public.posts.svg b/sample/postgres/public.posts.svg index 4036208a..afecc5cf 100644 --- a/sample/postgres/public.posts.svg +++ b/sample/postgres/public.posts.svg @@ -4,11 +4,11 @@ - + public.posts - + public.posts @@ -46,66 +46,66 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.posts:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -117,32 +117,32 @@ public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] diff --git a/sample/postgres/public.user_options.svg b/sample/postgres/public.user_options.svg index b9962b08..b7037a32 100644 --- a/sample/postgres/public.user_options.svg +++ b/sample/postgres/public.user_options.svg @@ -34,35 +34,35 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.user_options:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE diff --git a/sample/postgres/public.users.svg b/sample/postgres/public.users.svg index af631cc6..fa92471f 100644 --- a/sample/postgres/public.users.svg +++ b/sample/postgres/public.users.svg @@ -4,248 +4,248 @@ - + public.users - + public.users - - -public.users -     -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] - + + +public.users +     +[BASE TABLE] + +id +[integer] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp without time zone] + +updated +[timestamp without time zone] + public.user_options - - -public.user_options - -[BASE TABLE] - -user_id -[integer] - -show_email -[boolean] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.user_options +     +[BASE TABLE] + +user_id     +[integer] + +show_email     +[boolean] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.user_options:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.posts - - -public.posts - -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.posts:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) + + +FOREIGN KEY (user_id) REFERENCES users(id) public.comment_stars - - -public.comment_stars - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -comment_post_id -[bigint] - -comment_user_id -[integer] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comment_stars +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +comment_post_id     +[bigint] + +comment_user_id     +[integer] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comment_stars:comment_user_id->public.users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users(id) + + +FOREIGN KEY (comment_user_id) REFERENCES users(id) administrator.blogs - - -administrator.blogs - -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -name -[text] - -description -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +administrator.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +name     +[text] + +description     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] administrator.blogs:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:user_id->public.users:id - - -logs->users + + +logs->users diff --git a/sample/postgres/schema.svg b/sample/postgres/schema.svg index 322d0fe7..7f63463a 100644 --- a/sample/postgres/schema.svg +++ b/sample/postgres/schema.svg @@ -4,37 +4,37 @@ - + testdb - + public.users - - -public.users -     -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -45,108 +45,108 @@      [BASE TABLE] -user_id -[integer] +user_id     +[integer] -show_email -[boolean] +show_email     +[boolean] -created -[timestamp without time zone] +created     +[timestamp without time zone] -updated -[timestamp without time zone] +updated     +[timestamp without time zone] public.user_options:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.posts - - -public.posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.posts:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.comments - - -public.comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -post_id_desc -[bigint] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +post_id_desc     +[bigint] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) + + +FOREIGN KEY (user_id) REFERENCES users(id) public.comments:post_id->public.posts:id - - -FOREIGN KEY (post_id) REFERENCES posts(id) + + +FOREIGN KEY (post_id) REFERENCES posts(id) @@ -157,334 +157,334 @@      [BASE TABLE] -id -[uuid] +id     +[uuid] -user_id -[integer] +user_id     +[integer] -comment_post_id -[bigint] +comment_post_id     +[bigint] -comment_user_id -[integer] +comment_user_id     +[integer] -created -[timestamp without time zone] +created     +[timestamp without time zone] -updated -[timestamp without time zone] +updated     +[timestamp without time zone] public.comment_stars:comment_user_id->public.users:id - - + + FOREIGN KEY (comment_user_id) REFERENCES users(id) public.comment_stars:comment_post_id->public.comments:post_id - - + + FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id) public.logs - - -public.logs -     -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:user_id->public.users:id - - -logs->users + + +logs->users public.logs:post_id->public.posts:id - - -Additional Relation + + +Additional Relation public.logs:comment_id->public.comments:id - - -Additional Relation + + +Additional Relation public.logs:comment_star_id->public.comment_stars:id - - -Additional Relation + + +Additional Relation public.post_comments - - -public.post_comments -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.post_comments +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.post_comment_stars - - -public.post_comment_stars -     -[MATERIALIZED VIEW] - -id -[uuid] - -comment_user -[varchar(50)] - -comment_star_user -[varchar(50)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.post_comment_stars +     +[MATERIALIZED VIEW] + +id     +[uuid] + +comment_user     +[varchar(50)] + +comment_star_user     +[varchar(50)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.CamelizeTable - - -public.CamelizeTable -     -[BASE TABLE] - -id -[uuid] - -created -[timestamp without time zone] + + +public.CamelizeTable +     +[BASE TABLE] + +id     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table - - -public.hyphen-table -     -[BASE TABLE] - -id -[uuid] - -hyphen-column -[text] - -CamelizeTableId -[uuid] - -created -[timestamp without time zone] + + +public.hyphen-table +     +[BASE TABLE] + +id     +[uuid] + +hyphen-column     +[text] + +CamelizeTableId     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table:CamelizeTableId->public.CamelizeTable:id - - -FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE + + +FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE administrator.blogs - - -administrator.blogs -     -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -name -[text] - -description -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +administrator.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +name     +[text] + +description     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] administrator.blogs:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE backup.blogs - - -backup.blogs -     -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -dump -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +backup.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +dump     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] backup.blog_options - - -backup.blog_options -     -[BASE TABLE] - -id -[integer] - -blog_id -[integer] - -label -[text] - -updated -[timestamp without time zone] + + +backup.blog_options +     +[BASE TABLE] + +id     +[integer] + +blog_id     +[integer] + +label     +[text] + +updated     +[timestamp without time zone] backup.blog_options:blog_id->backup.blogs:id - - -FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE + + +FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE time.bar - - -time.bar -     -[BASE TABLE] - -id -[integer] + + +time.bar +     +[BASE TABLE] + +id     +[integer] time.hyphenated-table - - -time.hyphenated-table -     -[BASE TABLE] - -id -[integer] + + +time.hyphenated-table +     +[BASE TABLE] + +id     +[integer] time.referencing - - -time.referencing -     -[BASE TABLE] - -id -[integer] - -bar_id -[integer] - -ht_id -[integer] + + +time.referencing +     +[BASE TABLE] + +id     +[integer] + +bar_id     +[integer] + +ht_id     +[integer] time.referencing:bar_id->time.bar:id - - -FOREIGN KEY (bar_id) REFERENCES "time".bar(id) + + +FOREIGN KEY (bar_id) REFERENCES "time".bar(id) time.referencing:ht_id->time.hyphenated-table:id - - -FOREIGN KEY (ht_id) REFERENCES "time"."hyphenated-table"(id) + + +FOREIGN KEY (ht_id) REFERENCES "time"."hyphenated-table"(id) diff --git a/sample/postgres/time.bar.svg b/sample/postgres/time.bar.svg index 7ab5c505..414a7054 100644 --- a/sample/postgres/time.bar.svg +++ b/sample/postgres/time.bar.svg @@ -4,48 +4,48 @@ - + time.bar - + time.bar - - -time.bar -     -[BASE TABLE] - -id -[integer] - + + +time.bar +     +[BASE TABLE] + +id +[integer] + time.referencing - - -time.referencing - -[BASE TABLE] - -id -[integer] - -bar_id -[integer] - -ht_id -[integer] + + +time.referencing +     +[BASE TABLE] + +id     +[integer] + +bar_id     +[integer] + +ht_id     +[integer] time.referencing:bar_id->time.bar:id - - -FOREIGN KEY (bar_id) REFERENCES "time".bar(id) + + +FOREIGN KEY (bar_id) REFERENCES "time".bar(id) diff --git a/sample/postgres/time.hyphenated-table.svg b/sample/postgres/time.hyphenated-table.svg index 58bbb997..a4f994d6 100644 --- a/sample/postgres/time.hyphenated-table.svg +++ b/sample/postgres/time.hyphenated-table.svg @@ -25,20 +25,20 @@ time.referencing - - -time.referencing - -[BASE TABLE] - -id -[integer] - -bar_id -[integer] - -ht_id -[integer] + + +time.referencing +     +[BASE TABLE] + +id     +[integer] + +bar_id     +[integer] + +ht_id     +[integer] diff --git a/sample/postgres/time.referencing.svg b/sample/postgres/time.referencing.svg index f0bb10ef..b224b74c 100644 --- a/sample/postgres/time.referencing.svg +++ b/sample/postgres/time.referencing.svg @@ -31,14 +31,14 @@ time.bar - - -time.bar - -[BASE TABLE] - -id -[integer] + + +time.bar +     +[BASE TABLE] + +id     +[integer] @@ -50,14 +50,14 @@ time.hyphenated-table - - -time.hyphenated-table - -[BASE TABLE] - -id -[integer] + + +time.hyphenated-table +     +[BASE TABLE] + +id     +[integer] diff --git a/sample/postgres95/administrator.blogs.svg b/sample/postgres95/administrator.blogs.svg index 867b67ae..504935c3 100644 --- a/sample/postgres95/administrator.blogs.svg +++ b/sample/postgres95/administrator.blogs.svg @@ -40,35 +40,35 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] administrator.blogs:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE diff --git a/sample/postgres95/backup.blog_options.svg b/sample/postgres95/backup.blog_options.svg index 2243bdf3..858a77bc 100644 --- a/sample/postgres95/backup.blog_options.svg +++ b/sample/postgres95/backup.blog_options.svg @@ -34,32 +34,32 @@ backup.blogs - - -backup.blogs - -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -dump -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +backup.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +dump     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] backup.blog_options:blog_id->backup.blogs:id - - + + FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE diff --git a/sample/postgres95/backup.blogs.svg b/sample/postgres95/backup.blogs.svg index c0728a48..5a3cc1ea 100644 --- a/sample/postgres95/backup.blogs.svg +++ b/sample/postgres95/backup.blogs.svg @@ -4,62 +4,62 @@ - + backup.blogs - + backup.blogs - - -backup.blogs -     -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -dump -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] - + + +backup.blogs +     +[BASE TABLE] + +id +[integer] + +user_id +[integer] + +dump +[text] + +created +[timestamp without time zone] + +updated +[timestamp without time zone] + backup.blog_options - - -backup.blog_options - -[BASE TABLE] - -id -[integer] - -blog_id -[integer] - -label -[text] - -updated -[timestamp without time zone] + + +backup.blog_options +     +[BASE TABLE] + +id     +[integer] + +blog_id     +[integer] + +label     +[text] + +updated     +[timestamp without time zone] backup.blog_options:blog_id->backup.blogs:id - - + + FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE diff --git a/sample/postgres95/public.CamelizeTable.svg b/sample/postgres95/public.CamelizeTable.svg index 1b5091bd..d3df0025 100644 --- a/sample/postgres95/public.CamelizeTable.svg +++ b/sample/postgres95/public.CamelizeTable.svg @@ -4,53 +4,53 @@ - + public.CamelizeTable - + public.CamelizeTable - - -public.CamelizeTable -     -[BASE TABLE] - -id -[uuid] - -created -[timestamp without time zone] - + + +public.CamelizeTable +     +[BASE TABLE] + +id +[uuid] + +created +[timestamp without time zone] + public.hyphen-table - - -public.hyphen-table - -[BASE TABLE] - -id -[uuid] - -hyphen-column -[text] - -CamelizeTableId -[uuid] - -created -[timestamp without time zone] + + +public.hyphen-table +     +[BASE TABLE] + +id     +[uuid] + +hyphen-column     +[text] + +CamelizeTableId     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table:CamelizeTableId->public.CamelizeTable:id - - + + FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE diff --git a/sample/postgres95/public.comment_stars.svg b/sample/postgres95/public.comment_stars.svg index ac45a75e..366eb728 100644 --- a/sample/postgres95/public.comment_stars.svg +++ b/sample/postgres95/public.comment_stars.svg @@ -40,29 +40,29 @@ public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -74,29 +74,29 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -108,39 +108,39 @@ public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:comment_star_id->public.comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/postgres95/public.comments.svg b/sample/postgres95/public.comments.svg index e1af7b5f..a0c72fea 100644 --- a/sample/postgres95/public.comments.svg +++ b/sample/postgres95/public.comments.svg @@ -4,183 +4,183 @@ - + public.comments - + public.comments - - -public.comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] - + + +public.comments +     +[BASE TABLE] + +id +[bigint] + +post_id +[bigint] + +user_id +[integer] + +comment +[text] + +created +[timestamp without time zone] + +updated +[timestamp without time zone] + public.posts - - -public.posts - -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:post_id->public.posts:id - - -FOREIGN KEY (post_id) REFERENCES posts(id) + + +FOREIGN KEY (post_id) REFERENCES posts(id) public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) + + +FOREIGN KEY (user_id) REFERENCES users(id) public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:comment_id->public.comments:id - - -Additional Relation + + +Additional Relation public.comment_stars - - -public.comment_stars - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -comment_post_id -[bigint] - -comment_user_id -[integer] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comment_stars +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +comment_post_id     +[bigint] + +comment_user_id     +[integer] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comment_stars:comment_post_id->public.comments:post_id - - -FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id) + + +FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id) diff --git a/sample/postgres95/public.hyphen-table.svg b/sample/postgres95/public.hyphen-table.svg index 37d46bc5..e4f01fe9 100644 --- a/sample/postgres95/public.hyphen-table.svg +++ b/sample/postgres95/public.hyphen-table.svg @@ -4,11 +4,11 @@ - + public.hyphen-table - + public.hyphen-table @@ -34,23 +34,23 @@ public.CamelizeTable - - -public.CamelizeTable - -[BASE TABLE] - -id -[uuid] - -created -[timestamp without time zone] + + +public.CamelizeTable +     +[BASE TABLE] + +id     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table:CamelizeTableId->public.CamelizeTable:id - - + + FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE diff --git a/sample/postgres95/public.logs.svg b/sample/postgres95/public.logs.svg index 24fb12c2..d4a7f3cb 100644 --- a/sample/postgres95/public.logs.svg +++ b/sample/postgres95/public.logs.svg @@ -4,183 +4,183 @@ - + public.logs - + public.logs - - -public.logs -     -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] - + + +public.logs +     +[BASE TABLE] + +id +[uuid] + +user_id +[integer] + +post_id +[bigint] + +comment_id +[bigint] + +comment_star_id +[uuid] + +payload +[text] + +created +[timestamp without time zone] + public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:user_id->public.users:id - - -logs->users + + +logs->users public.posts - - -public.posts - -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:post_id->public.posts:id - - -Additional Relation + + +Additional Relation public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:comment_id->public.comments:id - - -Additional Relation + + +Additional Relation public.comment_stars - - -public.comment_stars - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -comment_post_id -[bigint] - -comment_user_id -[integer] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comment_stars +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +comment_post_id     +[bigint] + +comment_user_id     +[integer] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.logs:comment_star_id->public.comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/postgres95/public.posts.svg b/sample/postgres95/public.posts.svg index 299def68..4908231d 100644 --- a/sample/postgres95/public.posts.svg +++ b/sample/postgres95/public.posts.svg @@ -4,11 +4,11 @@ - + public.posts - + public.posts @@ -46,63 +46,63 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.posts:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -114,32 +114,32 @@ public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] diff --git a/sample/postgres95/public.user_options.svg b/sample/postgres95/public.user_options.svg index b9962b08..b7037a32 100644 --- a/sample/postgres95/public.user_options.svg +++ b/sample/postgres95/public.user_options.svg @@ -34,35 +34,35 @@ public.users - - -public.users - -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.user_options:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE diff --git a/sample/postgres95/public.users.svg b/sample/postgres95/public.users.svg index 31e390b7..02aab391 100644 --- a/sample/postgres95/public.users.svg +++ b/sample/postgres95/public.users.svg @@ -4,245 +4,245 @@ - + public.users - + public.users - - -public.users -     -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] - + + +public.users +     +[BASE TABLE] + +id +[integer] + +username +[varchar(50)] + +password +[varchar(50)] + +email +[varchar(355)] + +created +[timestamp without time zone] + +updated +[timestamp without time zone] + public.user_options - - -public.user_options - -[BASE TABLE] - -user_id -[integer] - -show_email -[boolean] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.user_options +     +[BASE TABLE] + +user_id     +[integer] + +show_email     +[boolean] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.user_options:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.posts - - -public.posts - -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.posts:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.comments - - -public.comments - -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) + + +FOREIGN KEY (user_id) REFERENCES users(id) public.comment_stars - - -public.comment_stars - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -comment_post_id -[bigint] - -comment_user_id -[integer] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comment_stars +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +comment_post_id     +[bigint] + +comment_user_id     +[integer] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comment_stars:comment_user_id->public.users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users(id) + + +FOREIGN KEY (comment_user_id) REFERENCES users(id) administrator.blogs - - -administrator.blogs - -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -name -[text] - -description -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +administrator.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +name     +[text] + +description     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] administrator.blogs:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.logs - - -public.logs - -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:user_id->public.users:id - - -logs->users + + +logs->users diff --git a/sample/postgres95/schema.json b/sample/postgres95/schema.json index fd2ea0f2..68764a3c 100644 --- a/sample/postgres95/schema.json +++ b/sample/postgres95/schema.json @@ -1 +1 @@ -{"name":"testdb","desc":"Sample PostgreSQL database document.","tables":[{"name":"public.users","type":"BASE TABLE","comment":"Users table","columns":[{"name":"id","type":"integer","nullable":false,"default":"nextval('users_id_seq'::regclass)","comment":""},{"name":"username","type":"varchar(50)","nullable":false,"default":null,"comment":""},{"name":"password","type":"varchar(50)","nullable":false,"default":null,"comment":""},{"name":"email","type":"varchar(355)","nullable":false,"default":null,"comment":"ex. user@example.com"},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"users_pkey","def":"CREATE UNIQUE INDEX users_pkey ON public.users USING btree (id)","table":"public.users","columns":["id"],"comment":""},{"name":"users_username_key","def":"CREATE UNIQUE INDEX users_username_key ON public.users USING btree (username)","table":"public.users","columns":["username"],"comment":""},{"name":"users_email_key","def":"CREATE UNIQUE INDEX users_email_key ON public.users USING btree (email)","table":"public.users","columns":["email"],"comment":""}],"constraints":[{"name":"users_username_check","type":"CHECK","def":"CHECK ((char_length((username)::text) \u003e 4))","table":"public.users","referenced_table":"","columns":["username"],"referenced_columns":[],"comment":""},{"name":"users_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"public.users","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""},{"name":"users_username_key","type":"UNIQUE","def":"UNIQUE (username)","table":"public.users","referenced_table":"","columns":["username"],"referenced_columns":[],"comment":""},{"name":"users_email_key","type":"UNIQUE","def":"UNIQUE (email)","table":"public.users","referenced_table":"","columns":["email"],"referenced_columns":[],"comment":""}],"triggers":[{"name":"update_users_updated","def":"CREATE TRIGGER update_users_updated AFTER INSERT OR UPDATE ON public.users FOR EACH ROW EXECUTE PROCEDURE update_updated()","comment":"Update updated when users insert or update"}],"def":""},{"name":"public.user_options","type":"BASE TABLE","comment":"User options table","columns":[{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"show_email","type":"boolean","nullable":false,"default":"false","comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"user_options_pkey","def":"CREATE UNIQUE INDEX user_options_pkey ON public.user_options USING btree (user_id)","table":"public.user_options","columns":["user_id"],"comment":"PRIMARY KEY"}],"constraints":[{"name":"user_options_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","table":"public.user_options","referenced_table":"users","columns":["user_id"],"referenced_columns":["id"],"comment":"FK"},{"name":"user_options_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (user_id)","table":"public.user_options","referenced_table":"","columns":["user_id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"public.posts","type":"BASE TABLE","comment":"Posts table","columns":[{"name":"id","type":"bigint","nullable":false,"default":"nextval('posts_id_seq'::regclass)","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"title","type":"varchar(255)","nullable":false,"default":"'Untitled'::character varying","comment":""},{"name":"body","type":"text","nullable":false,"default":null,"comment":"post body"},{"name":"post_type","type":"post_types","nullable":false,"default":null,"comment":"public/private/draft"},{"name":"labels","type":"varchar(50)[]","nullable":true,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"posts_id_pk","def":"CREATE UNIQUE INDEX posts_id_pk ON public.posts USING btree (id)","table":"public.posts","columns":["id"],"comment":""},{"name":"posts_user_id_title_key","def":"CREATE UNIQUE INDEX posts_user_id_title_key ON public.posts USING btree (user_id, title)","table":"public.posts","columns":["title","user_id"],"comment":""},{"name":"posts_user_id_idx","def":"CREATE INDEX posts_user_id_idx ON public.posts USING btree (user_id)","table":"public.posts","columns":["user_id"],"comment":"posts.user_id index"}],"constraints":[{"name":"update_posts_updated","type":"TRIGGER","def":"CREATE CONSTRAINT TRIGGER update_posts_updated AFTER INSERT OR UPDATE ON public.posts NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE update_updated()","table":"public.posts","referenced_table":"","columns":["updated","tableoid","cmax","xmax","cmin","xmin","ctid","id","user_id","title","body","post_type","labels","created"],"referenced_columns":[],"comment":""},{"name":"posts_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","table":"public.posts","referenced_table":"users","columns":["user_id"],"referenced_columns":["id"],"comment":"posts -\u003e users"},{"name":"posts_id_pk","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"public.posts","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""},{"name":"posts_user_id_title_key","type":"UNIQUE","def":"UNIQUE (user_id, title)","table":"public.posts","referenced_table":"","columns":["user_id","title"],"referenced_columns":[],"comment":""}],"triggers":[{"name":"update_posts_updated","def":"CREATE CONSTRAINT TRIGGER update_posts_updated AFTER INSERT OR UPDATE ON public.posts NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE update_updated()","comment":"Update updated when posts update"}],"def":""},{"name":"public.comments","type":"BASE TABLE","comment":"Comments\nMulti-line\r\ntable\rcomment","columns":[{"name":"id","type":"bigint","nullable":false,"default":"nextval('comments_id_seq'::regclass)","comment":""},{"name":"post_id","type":"bigint","nullable":false,"default":null,"comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"comment","type":"text","nullable":false,"default":null,"comment":"Comment\nMulti-line\r\ncolumn\rcomment"},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"comments_id_pk","def":"CREATE UNIQUE INDEX comments_id_pk ON public.comments USING btree (id)","table":"public.comments","columns":["id"],"comment":""},{"name":"comments_post_id_user_id_key","def":"CREATE UNIQUE INDEX comments_post_id_user_id_key ON public.comments USING btree (post_id, user_id)","table":"public.comments","columns":["post_id","user_id"],"comment":""},{"name":"comments_post_id_user_id_idx","def":"CREATE INDEX comments_post_id_user_id_idx ON public.comments USING btree (post_id, user_id)","table":"public.comments","columns":["post_id","user_id"],"comment":""}],"constraints":[{"name":"comments_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (user_id) REFERENCES users(id)","table":"public.comments","referenced_table":"users","columns":["user_id"],"referenced_columns":["id"],"comment":""},{"name":"comments_post_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (post_id) REFERENCES posts(id)","table":"public.comments","referenced_table":"posts","columns":["post_id"],"referenced_columns":["id"],"comment":""},{"name":"comments_id_pk","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"public.comments","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""},{"name":"comments_post_id_user_id_key","type":"UNIQUE","def":"UNIQUE (post_id, user_id)","table":"public.comments","referenced_table":"","columns":["post_id","user_id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"public.comment_stars","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"uuid","nullable":false,"default":"uuid_generate_v4()","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"comment_post_id","type":"bigint","nullable":false,"default":null,"comment":""},{"name":"comment_user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"comment_stars_user_id_comment_post_id_comment_user_id_key","def":"CREATE UNIQUE INDEX comment_stars_user_id_comment_post_id_comment_user_id_key ON public.comment_stars USING btree (user_id, comment_post_id, comment_user_id)","table":"public.comment_stars","columns":["comment_post_id","comment_user_id","user_id"],"comment":""}],"constraints":[{"name":"comment_stars_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (comment_user_id) REFERENCES users(id)","table":"public.comment_stars","referenced_table":"users","columns":["comment_user_id"],"referenced_columns":["id"],"comment":""},{"name":"comment_stars_user_id_post_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id)","table":"public.comment_stars","referenced_table":"comments","columns":["comment_post_id","comment_user_id","comment_post_id","comment_user_id"],"referenced_columns":["post_id","post_id","user_id","user_id"],"comment":""},{"name":"comment_stars_user_id_comment_post_id_comment_user_id_key","type":"UNIQUE","def":"UNIQUE (user_id, comment_post_id, comment_user_id)","table":"public.comment_stars","referenced_table":"","columns":["user_id","comment_post_id","comment_user_id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"public.logs","type":"BASE TABLE","comment":"audit log table","columns":[{"name":"id","type":"uuid","nullable":false,"default":"uuid_generate_v4()","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"post_id","type":"bigint","nullable":true,"default":null,"comment":""},{"name":"comment_id","type":"bigint","nullable":true,"default":null,"comment":""},{"name":"comment_star_id","type":"uuid","nullable":true,"default":null,"comment":""},{"name":"payload","type":"text","nullable":true,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""}],"indexes":[],"constraints":[],"triggers":[],"def":""},{"name":"public.post_comments","type":"VIEW","comment":"post and comments View table","columns":[{"name":"id","type":"bigint","nullable":true,"default":null,"comment":"comments.id"},{"name":"title","type":"varchar(255)","nullable":true,"default":null,"comment":"posts.title"},{"name":"post_user","type":"varchar(50)","nullable":true,"default":null,"comment":"posts.users.username"},{"name":"comment","type":"text","nullable":true,"default":null,"comment":""},{"name":"comment_user","type":"varchar(50)","nullable":true,"default":null,"comment":"comments.users.username"},{"name":"created","type":"timestamp without time zone","nullable":true,"default":null,"comment":"comments.created"},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":"comments.updated"}],"indexes":[],"constraints":[],"triggers":[],"def":"CREATE VIEW post_comments AS (\n SELECT c.id,\n p.title,\n u.username AS post_user,\n c.comment,\n u2.username AS comment_user,\n c.created,\n c.updated\n FROM (((posts p\n LEFT JOIN comments c ON ((p.id = c.post_id)))\n LEFT JOIN users u ON ((u.id = p.user_id)))\n LEFT JOIN users u2 ON ((u2.id = c.user_id)))\n)","referenced_tables":["public.posts","public.comments","public.users"]},{"name":"public.post_comment_stars","type":"MATERIALIZED VIEW","comment":"","columns":[{"name":"id","type":"uuid","nullable":true,"default":null,"comment":""},{"name":"comment_user","type":"varchar(50)","nullable":true,"default":null,"comment":""},{"name":"comment_star_user","type":"varchar(50)","nullable":true,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":true,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[],"constraints":[],"triggers":[],"def":"CREATE MATERIALIZED VIEW post_comment_stars AS (\n SELECT cs.id,\n cu.username AS comment_user,\n csu.username AS comment_star_user,\n cs.created,\n cs.updated\n FROM (((comments c\n LEFT JOIN comment_stars cs ON (((cs.comment_post_id = c.id) AND (cs.comment_user_id = c.user_id))))\n LEFT JOIN users cu ON ((cu.id = cs.comment_user_id)))\n LEFT JOIN users csu ON ((csu.id = cs.user_id)))\n)","referenced_tables":["public.comments","public.comment_stars","public.users"]},{"name":"public.CamelizeTable","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"uuid","nullable":false,"default":"uuid_generate_v4()","comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"CamelizeTable_id_key","def":"CREATE UNIQUE INDEX \"CamelizeTable_id_key\" ON public.\"CamelizeTable\" USING btree (id)","table":"public.CamelizeTable","columns":["id"],"comment":""}],"constraints":[{"name":"CamelizeTable_id_key","type":"UNIQUE","def":"UNIQUE (id)","table":"public.CamelizeTable","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"public.hyphen-table","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"uuid","nullable":false,"default":"uuid_generate_v4()","comment":""},{"name":"hyphen-column","type":"text","nullable":false,"default":null,"comment":""},{"name":"CamelizeTableId","type":"uuid","nullable":false,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"hyphen-table_hyphen-column_key","def":"CREATE UNIQUE INDEX \"hyphen-table_hyphen-column_key\" ON public.\"hyphen-table\" USING btree (\"hyphen-column\")","table":"public.hyphen-table","columns":["hyphen-column"],"comment":""}],"constraints":[{"name":"hyphen-table_CamelizeTableId_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (\"CamelizeTableId\") REFERENCES \"CamelizeTable\"(id) ON DELETE CASCADE","table":"public.hyphen-table","referenced_table":"CamelizeTable","columns":["CamelizeTableId"],"referenced_columns":["id"],"comment":""},{"name":"hyphen-table_hyphen-column_key","type":"UNIQUE","def":"UNIQUE (\"hyphen-column\")","table":"public.hyphen-table","referenced_table":"","columns":["hyphen-column"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"administrator.blogs","type":"BASE TABLE","comment":"admin blogs","columns":[{"name":"id","type":"integer","nullable":false,"default":"nextval('administrator.blogs_id_seq'::regclass)","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"name","type":"text","nullable":false,"default":null,"comment":""},{"name":"description","type":"text","nullable":true,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"blogs_pkey","def":"CREATE UNIQUE INDEX blogs_pkey ON administrator.blogs USING btree (id)","table":"administrator.blogs","columns":["id"],"comment":""}],"constraints":[{"name":"blogs_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","table":"administrator.blogs","referenced_table":"users","columns":["user_id"],"referenced_columns":["id"],"comment":""},{"name":"blogs_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"administrator.blogs","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"backup.blogs","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":"nextval('blogs_id_seq'::regclass)","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"dump","type":"text","nullable":false,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"blogs_pkey","def":"CREATE UNIQUE INDEX blogs_pkey ON backup.blogs USING btree (id)","table":"backup.blogs","columns":["id"],"comment":""}],"constraints":[{"name":"blogs_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"backup.blogs","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"backup.blog_options","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":"nextval('blog_options_id_seq'::regclass)","comment":""},{"name":"blog_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"label","type":"text","nullable":true,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"blog_options_pkey","def":"CREATE UNIQUE INDEX blog_options_pkey ON backup.blog_options USING btree (id)","table":"backup.blog_options","columns":["id"],"comment":""}],"constraints":[{"name":"blog_options_blog_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE","table":"backup.blog_options","referenced_table":"blogs","columns":["blog_id"],"referenced_columns":["id"],"comment":""},{"name":"blog_options_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"backup.blog_options","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"time.bar","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"bar_pkey","def":"CREATE UNIQUE INDEX bar_pkey ON \"time\".bar USING btree (id)","table":"time.bar","columns":["id"],"comment":""}],"constraints":[{"name":"bar_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"time.bar","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"time.hyphenated-table","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"hyphenated-table_pkey","def":"CREATE UNIQUE INDEX \"hyphenated-table_pkey\" ON \"time\".\"hyphenated-table\" USING btree (id)","table":"time.hyphenated-table","columns":["id"],"comment":""}],"constraints":[{"name":"hyphenated-table_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"time.hyphenated-table","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"time.referencing","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"bar_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"ht_id","type":"integer","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"referencing_pkey","def":"CREATE UNIQUE INDEX referencing_pkey ON \"time\".referencing USING btree (id)","table":"time.referencing","columns":["id"],"comment":""}],"constraints":[{"name":"referencing_bar_id","type":"FOREIGN KEY","def":"FOREIGN KEY (bar_id) REFERENCES \"time\".bar(id)","table":"time.referencing","referenced_table":"bar","columns":["bar_id"],"referenced_columns":["id"],"comment":""},{"name":"referencing_ht_id","type":"FOREIGN KEY","def":"FOREIGN KEY (ht_id) REFERENCES \"time\".\"hyphenated-table\"(id)","table":"time.referencing","referenced_table":"hyphenated-table","columns":["ht_id"],"referenced_columns":["id"],"comment":""},{"name":"referencing_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"time.referencing","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""}],"relations":[{"table":"public.user_options","columns":["user_id"],"cardinality":"Zero or one","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","virtual":false},{"table":"public.posts","columns":["user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","virtual":false},{"table":"public.comments","columns":["user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (user_id) REFERENCES users(id)","virtual":false},{"table":"public.comments","columns":["post_id"],"cardinality":"Zero or more","parent_table":"public.posts","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (post_id) REFERENCES posts(id)","virtual":false},{"table":"public.comment_stars","columns":["comment_user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (comment_user_id) REFERENCES users(id)","virtual":false},{"table":"public.comment_stars","columns":["comment_post_id","comment_user_id"],"cardinality":"Zero or more","parent_table":"public.comments","parent_columns":["post_id","user_id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id)","virtual":false},{"table":"public.hyphen-table","columns":["CamelizeTableId"],"cardinality":"Zero or more","parent_table":"public.CamelizeTable","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (\"CamelizeTableId\") REFERENCES \"CamelizeTable\"(id) ON DELETE CASCADE","virtual":false},{"table":"administrator.blogs","columns":["user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","virtual":false},{"table":"backup.blog_options","columns":["blog_id"],"cardinality":"Zero or more","parent_table":"backup.blogs","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE","virtual":false},{"table":"time.referencing","columns":["bar_id"],"cardinality":"Zero or more","parent_table":"time.bar","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (bar_id) REFERENCES \"time\".bar(id)","virtual":false},{"table":"time.referencing","columns":["ht_id"],"cardinality":"Zero or more","parent_table":"time.hyphenated-table","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (ht_id) REFERENCES \"time\".\"hyphenated-table\"(id)","virtual":false},{"table":"public.logs","columns":["user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"logs-\u003eusers","virtual":true},{"table":"public.logs","columns":["post_id"],"cardinality":"Zero or more","parent_table":"public.posts","parent_columns":["id"],"parent_cardinality":"Zero or one","def":"Additional Relation","virtual":true},{"table":"public.logs","columns":["comment_id"],"cardinality":"Zero or more","parent_table":"public.comments","parent_columns":["id"],"parent_cardinality":"Zero or one","def":"Additional Relation","virtual":true},{"table":"public.logs","columns":["comment_star_id"],"cardinality":"Zero or more","parent_table":"public.comment_stars","parent_columns":["id"],"parent_cardinality":"Zero or one","def":"Additional Relation","virtual":true}],"functions":[{"name":"public.uuid_nil","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_ns_dns","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_ns_url","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_ns_oid","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_ns_x500","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_generate_v1","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_generate_v1mc","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_generate_v3","return_type":"uuid","arguments":"namespace uuid, name text","type":"FUNCTION"},{"name":"public.uuid_generate_v4","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_generate_v5","return_type":"uuid","arguments":"namespace uuid, name text","type":"FUNCTION"},{"name":"public.update_updated","return_type":"trigger","arguments":"","type":"FUNCTION"}],"driver":{"name":"postgres","database_version":"PostgreSQL 9.5.25 on x86_64-pc-linux-gnu (Debian 9.5.25-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit","meta":{"current_schema":"public","search_paths":["\"$user\"","public","backup"],"dict":{"Functions":"Stored procedures and functions"}}}} +{"name":"testdb","desc":"Sample PostgreSQL database document.","tables":[{"name":"public.users","type":"BASE TABLE","comment":"Users table","columns":[{"name":"id","type":"integer","nullable":false,"default":"nextval('users_id_seq'::regclass)","comment":""},{"name":"username","type":"varchar(50)","nullable":false,"default":null,"comment":""},{"name":"password","type":"varchar(50)","nullable":false,"default":null,"comment":""},{"name":"email","type":"varchar(355)","nullable":false,"default":null,"comment":"ex. user@example.com"},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"users_pkey","def":"CREATE UNIQUE INDEX users_pkey ON public.users USING btree (id)","table":"public.users","columns":["id"],"comment":""},{"name":"users_username_key","def":"CREATE UNIQUE INDEX users_username_key ON public.users USING btree (username)","table":"public.users","columns":["username"],"comment":""},{"name":"users_email_key","def":"CREATE UNIQUE INDEX users_email_key ON public.users USING btree (email)","table":"public.users","columns":["email"],"comment":""}],"constraints":[{"name":"users_username_check","type":"CHECK","def":"CHECK ((char_length((username)::text) \u003e 4))","table":"public.users","referenced_table":"","columns":["username"],"referenced_columns":[],"comment":""},{"name":"users_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"public.users","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""},{"name":"users_username_key","type":"UNIQUE","def":"UNIQUE (username)","table":"public.users","referenced_table":"","columns":["username"],"referenced_columns":[],"comment":""},{"name":"users_email_key","type":"UNIQUE","def":"UNIQUE (email)","table":"public.users","referenced_table":"","columns":["email"],"referenced_columns":[],"comment":""}],"triggers":[{"name":"update_users_updated","def":"CREATE TRIGGER update_users_updated AFTER INSERT OR UPDATE ON public.users FOR EACH ROW EXECUTE PROCEDURE update_updated()","comment":"Update updated when users insert or update"}],"def":""},{"name":"public.user_options","type":"BASE TABLE","comment":"User options table","columns":[{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"show_email","type":"boolean","nullable":false,"default":"false","comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"user_options_pkey","def":"CREATE UNIQUE INDEX user_options_pkey ON public.user_options USING btree (user_id)","table":"public.user_options","columns":["user_id"],"comment":"PRIMARY KEY"}],"constraints":[{"name":"user_options_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","table":"public.user_options","referenced_table":"users","columns":["user_id"],"referenced_columns":["id"],"comment":"FK"},{"name":"user_options_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (user_id)","table":"public.user_options","referenced_table":"","columns":["user_id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"public.posts","type":"BASE TABLE","comment":"Posts table","columns":[{"name":"id","type":"bigint","nullable":false,"default":"nextval('posts_id_seq'::regclass)","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"title","type":"varchar(255)","nullable":false,"default":"'Untitled'::character varying","comment":""},{"name":"body","type":"text","nullable":false,"default":null,"comment":"post body"},{"name":"post_type","type":"post_types","nullable":false,"default":null,"comment":"public/private/draft"},{"name":"labels","type":"varchar(50)[]","nullable":true,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"posts_id_pk","def":"CREATE UNIQUE INDEX posts_id_pk ON public.posts USING btree (id)","table":"public.posts","columns":["id"],"comment":""},{"name":"posts_user_id_title_key","def":"CREATE UNIQUE INDEX posts_user_id_title_key ON public.posts USING btree (user_id, title)","table":"public.posts","columns":["title","user_id"],"comment":""},{"name":"posts_user_id_idx","def":"CREATE INDEX posts_user_id_idx ON public.posts USING btree (user_id)","table":"public.posts","columns":["user_id"],"comment":"posts.user_id index"}],"constraints":[{"name":"update_posts_updated","type":"TRIGGER","def":"CREATE CONSTRAINT TRIGGER update_posts_updated AFTER INSERT OR UPDATE ON public.posts NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE update_updated()","table":"public.posts","referenced_table":"","columns":["updated","body","post_type","labels","created","tableoid","cmax","xmax","cmin","xmin","ctid","id","user_id","title"],"referenced_columns":[],"comment":""},{"name":"posts_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","table":"public.posts","referenced_table":"users","columns":["user_id"],"referenced_columns":["id"],"comment":"posts -\u003e users"},{"name":"posts_id_pk","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"public.posts","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""},{"name":"posts_user_id_title_key","type":"UNIQUE","def":"UNIQUE (user_id, title)","table":"public.posts","referenced_table":"","columns":["user_id","title"],"referenced_columns":[],"comment":""}],"triggers":[{"name":"update_posts_updated","def":"CREATE CONSTRAINT TRIGGER update_posts_updated AFTER INSERT OR UPDATE ON public.posts NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE update_updated()","comment":"Update updated when posts update"}],"def":""},{"name":"public.comments","type":"BASE TABLE","comment":"Comments\nMulti-line\r\ntable\rcomment","columns":[{"name":"id","type":"bigint","nullable":false,"default":"nextval('comments_id_seq'::regclass)","comment":""},{"name":"post_id","type":"bigint","nullable":false,"default":null,"comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"comment","type":"text","nullable":false,"default":null,"comment":"Comment\nMulti-line\r\ncolumn\rcomment"},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"comments_id_pk","def":"CREATE UNIQUE INDEX comments_id_pk ON public.comments USING btree (id)","table":"public.comments","columns":["id"],"comment":""},{"name":"comments_post_id_user_id_key","def":"CREATE UNIQUE INDEX comments_post_id_user_id_key ON public.comments USING btree (post_id, user_id)","table":"public.comments","columns":["post_id","user_id"],"comment":""},{"name":"comments_post_id_user_id_idx","def":"CREATE INDEX comments_post_id_user_id_idx ON public.comments USING btree (post_id, user_id)","table":"public.comments","columns":["post_id","user_id"],"comment":""}],"constraints":[{"name":"comments_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (user_id) REFERENCES users(id)","table":"public.comments","referenced_table":"users","columns":["user_id"],"referenced_columns":["id"],"comment":""},{"name":"comments_post_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (post_id) REFERENCES posts(id)","table":"public.comments","referenced_table":"posts","columns":["post_id"],"referenced_columns":["id"],"comment":""},{"name":"comments_id_pk","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"public.comments","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""},{"name":"comments_post_id_user_id_key","type":"UNIQUE","def":"UNIQUE (post_id, user_id)","table":"public.comments","referenced_table":"","columns":["post_id","user_id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"public.comment_stars","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"uuid","nullable":false,"default":"uuid_generate_v4()","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"comment_post_id","type":"bigint","nullable":false,"default":null,"comment":""},{"name":"comment_user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"comment_stars_user_id_comment_post_id_comment_user_id_key","def":"CREATE UNIQUE INDEX comment_stars_user_id_comment_post_id_comment_user_id_key ON public.comment_stars USING btree (user_id, comment_post_id, comment_user_id)","table":"public.comment_stars","columns":["comment_post_id","comment_user_id","user_id"],"comment":""}],"constraints":[{"name":"comment_stars_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (comment_user_id) REFERENCES users(id)","table":"public.comment_stars","referenced_table":"users","columns":["comment_user_id"],"referenced_columns":["id"],"comment":""},{"name":"comment_stars_user_id_post_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id)","table":"public.comment_stars","referenced_table":"comments","columns":["comment_user_id","comment_post_id","comment_post_id","comment_user_id"],"referenced_columns":["post_id","post_id","user_id","user_id"],"comment":""},{"name":"comment_stars_user_id_comment_post_id_comment_user_id_key","type":"UNIQUE","def":"UNIQUE (user_id, comment_post_id, comment_user_id)","table":"public.comment_stars","referenced_table":"","columns":["comment_user_id","comment_post_id","user_id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"public.logs","type":"BASE TABLE","comment":"audit log table","columns":[{"name":"id","type":"uuid","nullable":false,"default":"uuid_generate_v4()","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"post_id","type":"bigint","nullable":true,"default":null,"comment":""},{"name":"comment_id","type":"bigint","nullable":true,"default":null,"comment":""},{"name":"comment_star_id","type":"uuid","nullable":true,"default":null,"comment":""},{"name":"payload","type":"text","nullable":true,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""}],"indexes":[],"constraints":[],"triggers":[],"def":""},{"name":"public.post_comments","type":"VIEW","comment":"post and comments View table","columns":[{"name":"id","type":"bigint","nullable":true,"default":null,"comment":"comments.id"},{"name":"title","type":"varchar(255)","nullable":true,"default":null,"comment":"posts.title"},{"name":"post_user","type":"varchar(50)","nullable":true,"default":null,"comment":"posts.users.username"},{"name":"comment","type":"text","nullable":true,"default":null,"comment":""},{"name":"comment_user","type":"varchar(50)","nullable":true,"default":null,"comment":"comments.users.username"},{"name":"created","type":"timestamp without time zone","nullable":true,"default":null,"comment":"comments.created"},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":"comments.updated"}],"indexes":[],"constraints":[],"triggers":[],"def":"CREATE VIEW post_comments AS (\n SELECT c.id,\n p.title,\n u.username AS post_user,\n c.comment,\n u2.username AS comment_user,\n c.created,\n c.updated\n FROM (((posts p\n LEFT JOIN comments c ON ((p.id = c.post_id)))\n LEFT JOIN users u ON ((u.id = p.user_id)))\n LEFT JOIN users u2 ON ((u2.id = c.user_id)))\n)","referenced_tables":["public.posts","public.comments","public.users"]},{"name":"public.post_comment_stars","type":"MATERIALIZED VIEW","comment":"","columns":[{"name":"id","type":"uuid","nullable":true,"default":null,"comment":""},{"name":"comment_user","type":"varchar(50)","nullable":true,"default":null,"comment":""},{"name":"comment_star_user","type":"varchar(50)","nullable":true,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":true,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[],"constraints":[],"triggers":[],"def":"CREATE MATERIALIZED VIEW post_comment_stars AS (\n SELECT cs.id,\n cu.username AS comment_user,\n csu.username AS comment_star_user,\n cs.created,\n cs.updated\n FROM (((comments c\n LEFT JOIN comment_stars cs ON (((cs.comment_post_id = c.id) AND (cs.comment_user_id = c.user_id))))\n LEFT JOIN users cu ON ((cu.id = cs.comment_user_id)))\n LEFT JOIN users csu ON ((csu.id = cs.user_id)))\n)","referenced_tables":["public.comments","public.comment_stars","public.users"]},{"name":"public.CamelizeTable","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"uuid","nullable":false,"default":"uuid_generate_v4()","comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"CamelizeTable_id_key","def":"CREATE UNIQUE INDEX \"CamelizeTable_id_key\" ON public.\"CamelizeTable\" USING btree (id)","table":"public.CamelizeTable","columns":["id"],"comment":""}],"constraints":[{"name":"CamelizeTable_id_key","type":"UNIQUE","def":"UNIQUE (id)","table":"public.CamelizeTable","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"public.hyphen-table","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"uuid","nullable":false,"default":"uuid_generate_v4()","comment":""},{"name":"hyphen-column","type":"text","nullable":false,"default":null,"comment":""},{"name":"CamelizeTableId","type":"uuid","nullable":false,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"hyphen-table_hyphen-column_key","def":"CREATE UNIQUE INDEX \"hyphen-table_hyphen-column_key\" ON public.\"hyphen-table\" USING btree (\"hyphen-column\")","table":"public.hyphen-table","columns":["hyphen-column"],"comment":""}],"constraints":[{"name":"hyphen-table_CamelizeTableId_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (\"CamelizeTableId\") REFERENCES \"CamelizeTable\"(id) ON DELETE CASCADE","table":"public.hyphen-table","referenced_table":"CamelizeTable","columns":["CamelizeTableId"],"referenced_columns":["id"],"comment":""},{"name":"hyphen-table_hyphen-column_key","type":"UNIQUE","def":"UNIQUE (\"hyphen-column\")","table":"public.hyphen-table","referenced_table":"","columns":["hyphen-column"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"administrator.blogs","type":"BASE TABLE","comment":"admin blogs","columns":[{"name":"id","type":"integer","nullable":false,"default":"nextval('administrator.blogs_id_seq'::regclass)","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"name","type":"text","nullable":false,"default":null,"comment":""},{"name":"description","type":"text","nullable":true,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"blogs_pkey","def":"CREATE UNIQUE INDEX blogs_pkey ON administrator.blogs USING btree (id)","table":"administrator.blogs","columns":["id"],"comment":""}],"constraints":[{"name":"blogs_user_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","table":"administrator.blogs","referenced_table":"users","columns":["user_id"],"referenced_columns":["id"],"comment":""},{"name":"blogs_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"administrator.blogs","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"backup.blogs","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":"nextval('blogs_id_seq'::regclass)","comment":""},{"name":"user_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"dump","type":"text","nullable":false,"default":null,"comment":""},{"name":"created","type":"timestamp without time zone","nullable":false,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"blogs_pkey","def":"CREATE UNIQUE INDEX blogs_pkey ON backup.blogs USING btree (id)","table":"backup.blogs","columns":["id"],"comment":""}],"constraints":[{"name":"blogs_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"backup.blogs","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"backup.blog_options","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":"nextval('blog_options_id_seq'::regclass)","comment":""},{"name":"blog_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"label","type":"text","nullable":true,"default":null,"comment":""},{"name":"updated","type":"timestamp without time zone","nullable":true,"default":null,"comment":""}],"indexes":[{"name":"blog_options_pkey","def":"CREATE UNIQUE INDEX blog_options_pkey ON backup.blog_options USING btree (id)","table":"backup.blog_options","columns":["id"],"comment":""}],"constraints":[{"name":"blog_options_blog_id_fk","type":"FOREIGN KEY","def":"FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE","table":"backup.blog_options","referenced_table":"blogs","columns":["blog_id"],"referenced_columns":["id"],"comment":""},{"name":"blog_options_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"backup.blog_options","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"time.bar","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"bar_pkey","def":"CREATE UNIQUE INDEX bar_pkey ON \"time\".bar USING btree (id)","table":"time.bar","columns":["id"],"comment":""}],"constraints":[{"name":"bar_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"time.bar","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"time.hyphenated-table","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"hyphenated-table_pkey","def":"CREATE UNIQUE INDEX \"hyphenated-table_pkey\" ON \"time\".\"hyphenated-table\" USING btree (id)","table":"time.hyphenated-table","columns":["id"],"comment":""}],"constraints":[{"name":"hyphenated-table_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"time.hyphenated-table","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""},{"name":"time.referencing","type":"BASE TABLE","comment":"","columns":[{"name":"id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"bar_id","type":"integer","nullable":false,"default":null,"comment":""},{"name":"ht_id","type":"integer","nullable":false,"default":null,"comment":""}],"indexes":[{"name":"referencing_pkey","def":"CREATE UNIQUE INDEX referencing_pkey ON \"time\".referencing USING btree (id)","table":"time.referencing","columns":["id"],"comment":""}],"constraints":[{"name":"referencing_bar_id","type":"FOREIGN KEY","def":"FOREIGN KEY (bar_id) REFERENCES \"time\".bar(id)","table":"time.referencing","referenced_table":"bar","columns":["bar_id"],"referenced_columns":["id"],"comment":""},{"name":"referencing_ht_id","type":"FOREIGN KEY","def":"FOREIGN KEY (ht_id) REFERENCES \"time\".\"hyphenated-table\"(id)","table":"time.referencing","referenced_table":"hyphenated-table","columns":["ht_id"],"referenced_columns":["id"],"comment":""},{"name":"referencing_pkey","type":"PRIMARY KEY","def":"PRIMARY KEY (id)","table":"time.referencing","referenced_table":"","columns":["id"],"referenced_columns":[],"comment":""}],"triggers":[],"def":""}],"relations":[{"table":"public.user_options","columns":["user_id"],"cardinality":"Zero or one","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","virtual":false},{"table":"public.posts","columns":["user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","virtual":false},{"table":"public.comments","columns":["user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (user_id) REFERENCES users(id)","virtual":false},{"table":"public.comments","columns":["post_id"],"cardinality":"Zero or more","parent_table":"public.posts","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (post_id) REFERENCES posts(id)","virtual":false},{"table":"public.comment_stars","columns":["comment_user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (comment_user_id) REFERENCES users(id)","virtual":false},{"table":"public.comment_stars","columns":["comment_post_id","comment_user_id"],"cardinality":"Zero or more","parent_table":"public.comments","parent_columns":["post_id","user_id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id)","virtual":false},{"table":"public.hyphen-table","columns":["CamelizeTableId"],"cardinality":"Zero or more","parent_table":"public.CamelizeTable","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (\"CamelizeTableId\") REFERENCES \"CamelizeTable\"(id) ON DELETE CASCADE","virtual":false},{"table":"administrator.blogs","columns":["user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE","virtual":false},{"table":"backup.blog_options","columns":["blog_id"],"cardinality":"Zero or more","parent_table":"backup.blogs","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE","virtual":false},{"table":"time.referencing","columns":["bar_id"],"cardinality":"Zero or more","parent_table":"time.bar","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (bar_id) REFERENCES \"time\".bar(id)","virtual":false},{"table":"time.referencing","columns":["ht_id"],"cardinality":"Zero or more","parent_table":"time.hyphenated-table","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"FOREIGN KEY (ht_id) REFERENCES \"time\".\"hyphenated-table\"(id)","virtual":false},{"table":"public.logs","columns":["user_id"],"cardinality":"Zero or more","parent_table":"public.users","parent_columns":["id"],"parent_cardinality":"Exactly one","def":"logs-\u003eusers","virtual":true},{"table":"public.logs","columns":["post_id"],"cardinality":"Zero or more","parent_table":"public.posts","parent_columns":["id"],"parent_cardinality":"Zero or one","def":"Additional Relation","virtual":true},{"table":"public.logs","columns":["comment_id"],"cardinality":"Zero or more","parent_table":"public.comments","parent_columns":["id"],"parent_cardinality":"Zero or one","def":"Additional Relation","virtual":true},{"table":"public.logs","columns":["comment_star_id"],"cardinality":"Zero or more","parent_table":"public.comment_stars","parent_columns":["id"],"parent_cardinality":"Zero or one","def":"Additional Relation","virtual":true}],"functions":[{"name":"public.uuid_nil","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_ns_dns","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_ns_url","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_ns_oid","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_ns_x500","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_generate_v1","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_generate_v1mc","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_generate_v3","return_type":"uuid","arguments":"namespace uuid, name text","type":"FUNCTION"},{"name":"public.uuid_generate_v4","return_type":"uuid","arguments":"","type":"FUNCTION"},{"name":"public.uuid_generate_v5","return_type":"uuid","arguments":"namespace uuid, name text","type":"FUNCTION"},{"name":"public.update_updated","return_type":"trigger","arguments":"","type":"FUNCTION"}],"driver":{"name":"postgres","database_version":"PostgreSQL 9.5.25 on x86_64-pc-linux-gnu (Debian 9.5.25-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit","meta":{"current_schema":"public","search_paths":["\"$user\"","public","backup"],"dict":{"Functions":"Stored procedures and functions"}}}} diff --git a/sample/postgres95/schema.svg b/sample/postgres95/schema.svg index 2b421805..a322dc2f 100644 --- a/sample/postgres95/schema.svg +++ b/sample/postgres95/schema.svg @@ -4,37 +4,37 @@ - + testdb - + public.users - - -public.users -     -[BASE TABLE] - -id -[integer] - -username -[varchar(50)] - -password -[varchar(50)] - -email -[varchar(355)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.users +     +[BASE TABLE] + +id     +[integer] + +username     +[varchar(50)] + +password     +[varchar(50)] + +email     +[varchar(355)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] @@ -45,105 +45,105 @@      [BASE TABLE] -user_id -[integer] +user_id     +[integer] -show_email -[boolean] +show_email     +[boolean] -created -[timestamp without time zone] +created     +[timestamp without time zone] -updated -[timestamp without time zone] +updated     +[timestamp without time zone] public.user_options:user_id->public.users:id - - + + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.posts - - -public.posts -     -[BASE TABLE] - -id -[bigint] - -user_id -[integer] - -title -[varchar(255)] - -body -[text] - -post_type -[post_types] - -labels -[varchar(50)[]] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.posts +     +[BASE TABLE] + +id     +[bigint] + +user_id     +[integer] + +title     +[varchar(255)] + +body     +[text] + +post_type     +[post_types] + +labels     +[varchar(50)[]] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.posts:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE public.comments - - -public.comments -     -[BASE TABLE] - -id -[bigint] - -post_id -[bigint] - -user_id -[integer] - -comment -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.comments +     +[BASE TABLE] + +id     +[bigint] + +post_id     +[bigint] + +user_id     +[integer] + +comment     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.comments:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) + + +FOREIGN KEY (user_id) REFERENCES users(id) public.comments:post_id->public.posts:id - - -FOREIGN KEY (post_id) REFERENCES posts(id) + + +FOREIGN KEY (post_id) REFERENCES posts(id) @@ -154,334 +154,334 @@      [BASE TABLE] -id -[uuid] +id     +[uuid] -user_id -[integer] +user_id     +[integer] -comment_post_id -[bigint] +comment_post_id     +[bigint] -comment_user_id -[integer] +comment_user_id     +[integer] -created -[timestamp without time zone] +created     +[timestamp without time zone] -updated -[timestamp without time zone] +updated     +[timestamp without time zone] public.comment_stars:comment_user_id->public.users:id - - + + FOREIGN KEY (comment_user_id) REFERENCES users(id) public.comment_stars:comment_post_id->public.comments:post_id - - + + FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments(post_id, user_id) public.logs - - -public.logs -     -[BASE TABLE] - -id -[uuid] - -user_id -[integer] - -post_id -[bigint] - -comment_id -[bigint] - -comment_star_id -[uuid] - -payload -[text] - -created -[timestamp without time zone] + + +public.logs +     +[BASE TABLE] + +id     +[uuid] + +user_id     +[integer] + +post_id     +[bigint] + +comment_id     +[bigint] + +comment_star_id     +[uuid] + +payload     +[text] + +created     +[timestamp without time zone] public.logs:user_id->public.users:id - - -logs->users + + +logs->users public.logs:post_id->public.posts:id - - -Additional Relation + + +Additional Relation public.logs:comment_id->public.comments:id - - -Additional Relation + + +Additional Relation public.logs:comment_star_id->public.comment_stars:id - - -Additional Relation + + +Additional Relation public.post_comments - - -public.post_comments -     -[VIEW] - -id -[bigint] - -title -[varchar(255)] - -post_user -[varchar(50)] - -comment -[text] - -comment_user -[varchar(50)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.post_comments +     +[VIEW] + +id     +[bigint] + +title     +[varchar(255)] + +post_user     +[varchar(50)] + +comment     +[text] + +comment_user     +[varchar(50)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.post_comment_stars - - -public.post_comment_stars -     -[MATERIALIZED VIEW] - -id -[uuid] - -comment_user -[varchar(50)] - -comment_star_user -[varchar(50)] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +public.post_comment_stars +     +[MATERIALIZED VIEW] + +id     +[uuid] + +comment_user     +[varchar(50)] + +comment_star_user     +[varchar(50)] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] public.CamelizeTable - - -public.CamelizeTable -     -[BASE TABLE] - -id -[uuid] - -created -[timestamp without time zone] + + +public.CamelizeTable +     +[BASE TABLE] + +id     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table - - -public.hyphen-table -     -[BASE TABLE] - -id -[uuid] - -hyphen-column -[text] - -CamelizeTableId -[uuid] - -created -[timestamp without time zone] + + +public.hyphen-table +     +[BASE TABLE] + +id     +[uuid] + +hyphen-column     +[text] + +CamelizeTableId     +[uuid] + +created     +[timestamp without time zone] public.hyphen-table:CamelizeTableId->public.CamelizeTable:id - - -FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE + + +FOREIGN KEY ("CamelizeTableId") REFERENCES "CamelizeTable"(id) ON DELETE CASCADE administrator.blogs - - -administrator.blogs -     -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -name -[text] - -description -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +administrator.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +name     +[text] + +description     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] administrator.blogs:user_id->public.users:id - - -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE + + +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE backup.blogs - - -backup.blogs -     -[BASE TABLE] - -id -[integer] - -user_id -[integer] - -dump -[text] - -created -[timestamp without time zone] - -updated -[timestamp without time zone] + + +backup.blogs +     +[BASE TABLE] + +id     +[integer] + +user_id     +[integer] + +dump     +[text] + +created     +[timestamp without time zone] + +updated     +[timestamp without time zone] backup.blog_options - - -backup.blog_options -     -[BASE TABLE] - -id -[integer] - -blog_id -[integer] - -label -[text] - -updated -[timestamp without time zone] + + +backup.blog_options +     +[BASE TABLE] + +id     +[integer] + +blog_id     +[integer] + +label     +[text] + +updated     +[timestamp without time zone] backup.blog_options:blog_id->backup.blogs:id - - -FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE + + +FOREIGN KEY (blog_id) REFERENCES blogs(id) ON DELETE CASCADE time.bar - - -time.bar -     -[BASE TABLE] - -id -[integer] + + +time.bar +     +[BASE TABLE] + +id     +[integer] time.hyphenated-table - - -time.hyphenated-table -     -[BASE TABLE] - -id -[integer] + + +time.hyphenated-table +     +[BASE TABLE] + +id     +[integer] time.referencing - - -time.referencing -     -[BASE TABLE] - -id -[integer] - -bar_id -[integer] - -ht_id -[integer] + + +time.referencing +     +[BASE TABLE] + +id     +[integer] + +bar_id     +[integer] + +ht_id     +[integer] time.referencing:bar_id->time.bar:id - - -FOREIGN KEY (bar_id) REFERENCES "time".bar(id) + + +FOREIGN KEY (bar_id) REFERENCES "time".bar(id) time.referencing:ht_id->time.hyphenated-table:id - - -FOREIGN KEY (ht_id) REFERENCES "time"."hyphenated-table"(id) + + +FOREIGN KEY (ht_id) REFERENCES "time"."hyphenated-table"(id) diff --git a/sample/postgres95/time.bar.svg b/sample/postgres95/time.bar.svg index 7ab5c505..414a7054 100644 --- a/sample/postgres95/time.bar.svg +++ b/sample/postgres95/time.bar.svg @@ -4,48 +4,48 @@ - + time.bar - + time.bar - - -time.bar -     -[BASE TABLE] - -id -[integer] - + + +time.bar +     +[BASE TABLE] + +id +[integer] + time.referencing - - -time.referencing - -[BASE TABLE] - -id -[integer] - -bar_id -[integer] - -ht_id -[integer] + + +time.referencing +     +[BASE TABLE] + +id     +[integer] + +bar_id     +[integer] + +ht_id     +[integer] time.referencing:bar_id->time.bar:id - - -FOREIGN KEY (bar_id) REFERENCES "time".bar(id) + + +FOREIGN KEY (bar_id) REFERENCES "time".bar(id) diff --git a/sample/postgres95/time.hyphenated-table.svg b/sample/postgres95/time.hyphenated-table.svg index 58bbb997..a4f994d6 100644 --- a/sample/postgres95/time.hyphenated-table.svg +++ b/sample/postgres95/time.hyphenated-table.svg @@ -25,20 +25,20 @@ time.referencing - - -time.referencing - -[BASE TABLE] - -id -[integer] - -bar_id -[integer] - -ht_id -[integer] + + +time.referencing +     +[BASE TABLE] + +id     +[integer] + +bar_id     +[integer] + +ht_id     +[integer] diff --git a/sample/postgres95/time.referencing.svg b/sample/postgres95/time.referencing.svg index f0bb10ef..b224b74c 100644 --- a/sample/postgres95/time.referencing.svg +++ b/sample/postgres95/time.referencing.svg @@ -31,14 +31,14 @@ time.bar - - -time.bar - -[BASE TABLE] - -id -[integer] + + +time.bar +     +[BASE TABLE] + +id     +[integer] @@ -50,14 +50,14 @@ time.hyphenated-table - - -time.hyphenated-table - -[BASE TABLE] - -id -[integer] + + +time.hyphenated-table +     +[BASE TABLE] + +id     +[integer] diff --git a/sample/sqlite/comment_stars.svg b/sample/sqlite/comment_stars.svg index 9475334b..737e53e8 100644 --- a/sample/sqlite/comment_stars.svg +++ b/sample/sqlite/comment_stars.svg @@ -40,29 +40,29 @@ comments - - -comments - -[table] - -id -[INTEGER] - -post_id -[INTEGER] - -user_id -[INTEGER] - -comment -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +comments +     +[table] + +id     +[INTEGER] + +post_id     +[INTEGER] + +user_id     +[INTEGER] + +comment     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] @@ -74,29 +74,29 @@ users - - -users - -[table] - -id -[INTEGER] - -username -[TEXT] - -password -[TEXT] - -email -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +users +     +[table] + +id     +[INTEGER] + +username     +[TEXT] + +password     +[TEXT] + +email     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] @@ -108,39 +108,39 @@ logs - - -logs - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -post_id -[INTEGER] - -comment_id -[INTEGER] - -comment_star_id -[INTEGER] - -payload -[TEXT] - -created -[NUMERIC] + + +logs +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +post_id     +[INTEGER] + +comment_id     +[INTEGER] + +comment_star_id     +[INTEGER] + +payload     +[TEXT] + +created     +[NUMERIC] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/sqlite/comments.svg b/sample/sqlite/comments.svg index 08eeb929..0ef1485a 100644 --- a/sample/sqlite/comments.svg +++ b/sample/sqlite/comments.svg @@ -40,29 +40,29 @@ posts - - -posts - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -title -[TEXT] - -body -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +posts +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +title     +[TEXT] + +body     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] @@ -74,29 +74,29 @@ users - - -users - -[table] - -id -[INTEGER] - -username -[TEXT] - -password -[TEXT] - -email -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +users +     +[table] + +id     +[INTEGER] + +username     +[TEXT] + +password     +[TEXT] + +email     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] @@ -108,32 +108,32 @@ logs - - -logs - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -post_id -[INTEGER] - -comment_id -[INTEGER] - -comment_star_id -[INTEGER] - -payload -[TEXT] - -created -[NUMERIC] + + +logs +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +post_id     +[INTEGER] + +comment_id     +[INTEGER] + +comment_star_id     +[INTEGER] + +payload     +[TEXT] + +created     +[NUMERIC] @@ -145,29 +145,29 @@ comment_stars - - -comment_stars - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -comment_post_id -[INTEGER] - -comment_user_id -[INTEGER] - -created -[NUMERIC] - -updated -[NUMERIC] + + +comment_stars +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +comment_post_id     +[INTEGER] + +comment_user_id     +[INTEGER] + +created     +[NUMERIC] + +updated     +[NUMERIC] diff --git a/sample/sqlite/logs.svg b/sample/sqlite/logs.svg index d56f9970..bc031218 100644 --- a/sample/sqlite/logs.svg +++ b/sample/sqlite/logs.svg @@ -4,177 +4,177 @@ - + logs - + logs - - -logs -     -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -post_id -[INTEGER] - -comment_id -[INTEGER] - -comment_star_id -[INTEGER] - -payload -[TEXT] - -created -[NUMERIC] - + + +logs +     +[table] + +id +[INTEGER] + +user_id +[INTEGER] + +post_id +[INTEGER] + +comment_id +[INTEGER] + +comment_star_id +[INTEGER] + +payload +[TEXT] + +created +[NUMERIC] + users - - -users - -[table] - -id -[INTEGER] - -username -[TEXT] - -password -[TEXT] - -email -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +users +     +[table] + +id     +[INTEGER] + +username     +[TEXT] + +password     +[TEXT] + +email     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] logs:user_id->users:id - - -logs->users + + +logs->users posts - - -posts - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -title -[TEXT] - -body -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +posts +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +title     +[TEXT] + +body     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] logs:post_id->posts:id - - -Additional Relation + + +Additional Relation comments - - -comments - -[table] - -id -[INTEGER] - -post_id -[INTEGER] - -user_id -[INTEGER] - -comment -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +comments +     +[table] + +id     +[INTEGER] + +post_id     +[INTEGER] + +user_id     +[INTEGER] + +comment     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation comment_stars - - -comment_stars - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -comment_post_id -[INTEGER] - -comment_user_id -[INTEGER] - -created -[NUMERIC] - -updated -[NUMERIC] + + +comment_stars +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +comment_post_id     +[INTEGER] + +comment_user_id     +[INTEGER] + +created     +[NUMERIC] + +updated     +[NUMERIC] logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation diff --git a/sample/sqlite/posts.svg b/sample/sqlite/posts.svg index bc6056a1..0ffd5114 100644 --- a/sample/sqlite/posts.svg +++ b/sample/sqlite/posts.svg @@ -4,11 +4,11 @@ - + posts - + posts @@ -40,63 +40,63 @@ users - - -users - -[table] - -id -[INTEGER] - -username -[TEXT] - -password -[TEXT] - -email -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +users +     +[table] + +id     +[INTEGER] + +username     +[TEXT] + +password     +[TEXT] + +email     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] posts:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE comments - - -comments - -[table] - -id -[INTEGER] - -post_id -[INTEGER] - -user_id -[INTEGER] - -comment -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +comments +     +[table] + +id     +[INTEGER] + +post_id     +[INTEGER] + +user_id     +[INTEGER] + +comment     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] @@ -108,32 +108,32 @@ logs - - -logs - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -post_id -[INTEGER] - -comment_id -[INTEGER] - -comment_star_id -[INTEGER] - -payload -[TEXT] - -created -[NUMERIC] + + +logs +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +post_id     +[INTEGER] + +comment_id     +[INTEGER] + +comment_star_id     +[INTEGER] + +payload     +[TEXT] + +created     +[NUMERIC] diff --git a/sample/sqlite/schema.svg b/sample/sqlite/schema.svg index 54c02860..bcf29634 100644 --- a/sample/sqlite/schema.svg +++ b/sample/sqlite/schema.svg @@ -4,58 +4,58 @@ - + testdb.sqlite3 - + users - - -users -     -[table] - -id -[INTEGER] - -username -[TEXT] - -password -[TEXT] - -email -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +users +     +[table] + +id     +[INTEGER] + +username     +[TEXT] + +password     +[TEXT] + +email     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] user_options - - -user_options -     -[table] - -user_id -[INTEGER] - -show_email -[INTEGER] - -created -[NUMERIC] - -updated -[NUMERIC] + + +user_options +     +[table] + +user_id     +[INTEGER] + +show_email     +[INTEGER] + +created     +[NUMERIC] + +updated     +[NUMERIC] @@ -67,29 +67,29 @@ posts - - -posts -     -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -title -[TEXT] - -body -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +posts +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +title     +[TEXT] + +body     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] @@ -101,256 +101,256 @@ comments - - -comments -     -[table] - -id -[INTEGER] - -post_id -[INTEGER] - -user_id -[INTEGER] - -comment -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +comments +     +[table] + +id     +[INTEGER] + +post_id     +[INTEGER] + +user_id     +[INTEGER] + +comment     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE + + +FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE comments:post_id->posts:id - - + + FOREIGN KEY (post_id) REFERENCES posts (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE comment_stars - - -comment_stars -     -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -comment_post_id -[INTEGER] - -comment_user_id -[INTEGER] - -created -[NUMERIC] - -updated -[NUMERIC] + + +comment_stars +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +comment_post_id     +[INTEGER] + +comment_user_id     +[INTEGER] + +created     +[NUMERIC] + +updated     +[NUMERIC] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE comment_stars:comment_post_id->comments:post_id - - + + FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE logs - - + + logs      [table] - -id -[INTEGER] - -user_id -[INTEGER] - -post_id -[INTEGER] - -comment_id -[INTEGER] - -comment_star_id -[INTEGER] - -payload -[TEXT] - -created -[NUMERIC] + +id     +[INTEGER] + +user_id     +[INTEGER] + +post_id     +[INTEGER] + +comment_id     +[INTEGER] + +comment_star_id     +[INTEGER] + +payload     +[TEXT] + +created     +[NUMERIC] logs:user_id->users:id - - -logs->users + + +logs->users logs:post_id->posts:id - - -Additional Relation + + +Additional Relation logs:comment_id->comments:id - - -Additional Relation + + +Additional Relation logs:comment_star_id->comment_stars:id - - -Additional Relation + + +Additional Relation post_comments - - -post_comments -     -[view] - -id -[INTEGER] - -title -[TEXT] - -post_user -[TEXT] - -comment -[TEXT] - -comment_user -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +post_comments +     +[view] + +id     +[INTEGER] + +title     +[TEXT] + +post_user     +[TEXT] + +comment     +[TEXT] + +comment_user     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] CamelizeTable - - -CamelizeTable -     -[table] - -id -[INTEGER] - -created -[NUMERIC] + + +CamelizeTable +     +[table] + +id     +[INTEGER] + +created     +[NUMERIC] hyphen-table - - -hyphen-table -     -[table] - -id -[INTEGER] - -hyphen-column -[TEXT] - -created -[NUMERIC] + + +hyphen-table +     +[table] + +id     +[INTEGER] + +hyphen-column     +[TEXT] + +created     +[NUMERIC] check_constraints - - -check_constraints -     -[table] - -id -[INTEGER] - -col -[TEXT] - -brackets -[TEXT] - -checkcheck -[TEXT] - -downcase -[TEXT] - -nl -[TEXT] + + +check_constraints +     +[table] + +id     +[INTEGER] + +col     +[TEXT] + +brackets     +[TEXT] + +checkcheck     +[TEXT] + +downcase     +[TEXT] + +nl     +[TEXT] syslog - - -syslog -     -[virtual table] - -logs -[] + + +syslog +     +[virtual table] + +logs     +[] access_log - - -access_log -     -[virtual table] - -logs -[] + + +access_log +     +[virtual table] + +logs     +[] diff --git a/sample/sqlite/user_options.svg b/sample/sqlite/user_options.svg index 3ba3ddfd..de7facd8 100644 --- a/sample/sqlite/user_options.svg +++ b/sample/sqlite/user_options.svg @@ -34,35 +34,35 @@ users - - -users - -[table] - -id -[INTEGER] - -username -[TEXT] - -password -[TEXT] - -email -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +users +     +[table] + +id     +[INTEGER] + +username     +[TEXT] + +password     +[TEXT] + +email     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE diff --git a/sample/sqlite/users.svg b/sample/sqlite/users.svg index b13b951e..64223c19 100644 --- a/sample/sqlite/users.svg +++ b/sample/sqlite/users.svg @@ -4,205 +4,205 @@ - + users - + users - - -users -     -[table] - -id -[INTEGER] - -username -[TEXT] - -password -[TEXT] - -email -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] - + + +users +     +[table] + +id +[INTEGER] + +username +[TEXT] + +password +[TEXT] + +email +[TEXT] + +created +[NUMERIC] + +updated +[NUMERIC] + user_options - - -user_options - -[table] - -user_id -[INTEGER] - -show_email -[INTEGER] - -created -[NUMERIC] - -updated -[NUMERIC] + + +user_options +     +[table] + +user_id     +[INTEGER] + +show_email     +[INTEGER] + +created     +[NUMERIC] + +updated     +[NUMERIC] user_options:user_id->users:id - - + + FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE posts - - -posts - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -title -[TEXT] - -body -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +posts +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +title     +[TEXT] + +body     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] posts:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE + + +FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE comments - - -comments - -[table] - -id -[INTEGER] - -post_id -[INTEGER] - -user_id -[INTEGER] - -comment -[TEXT] - -created -[NUMERIC] - -updated -[NUMERIC] + + +comments +     +[table] + +id     +[INTEGER] + +post_id     +[INTEGER] + +user_id     +[INTEGER] + +comment     +[TEXT] + +created     +[NUMERIC] + +updated     +[NUMERIC] comments:user_id->users:id - - -FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE + + +FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE comment_stars - - -comment_stars - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -comment_post_id -[INTEGER] - -comment_user_id -[INTEGER] - -created -[NUMERIC] - -updated -[NUMERIC] + + +comment_stars +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +comment_post_id     +[INTEGER] + +comment_user_id     +[INTEGER] + +created     +[NUMERIC] + +updated     +[NUMERIC] comment_stars:comment_user_id->users:id - - -FOREIGN KEY (comment_user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE + + +FOREIGN KEY (comment_user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE logs - - -logs - -[table] - -id -[INTEGER] - -user_id -[INTEGER] - -post_id -[INTEGER] - -comment_id -[INTEGER] - -comment_star_id -[INTEGER] - -payload -[TEXT] - -created -[NUMERIC] + + +logs +     +[table] + +id     +[INTEGER] + +user_id     +[INTEGER] + +post_id     +[INTEGER] + +comment_id     +[INTEGER] + +comment_star_id     +[INTEGER] + +payload     +[TEXT] + +created     +[NUMERIC] logs:user_id->users:id - - -logs->users + + +logs->users