Compare commits

..

No commits in common. "49fc1537b73b766fe0772d955292681eb43c6068" and "e8084bdeb083b4434edb1291707ce8a1d2e716d6" have entirely different histories.

View File

@ -6,7 +6,7 @@
' ========== SYSTEM ========== ' ========== SYSTEM ==========
entity "system.users" as usr { entity "system.users" as usr {
* id : smallserial <<generated>> * id : uuid <<generated>>
-- --
* name : varchar(32) * name : varchar(32)
* password : text * password : text
@ -14,9 +14,8 @@ entity "system.users" as usr {
} }
entity "system.mime" as mime { entity "system.mime" as mime {
* id : smallserial <<generated>>
--
* name : varchar(127) * name : varchar(127)
--
* extension : varchar(16) * extension : varchar(16)
} }
@ -29,8 +28,8 @@ entity "data.categories" as cty {
* name : varchar(256) * name : varchar(256)
notes : text notes : text
color : char(6) color : char(6)
' * created_at : timestamptz <<generated>> * created_at : timestamptz <<generated>>
* creator_id : smallint * creator_id : uuid
' * is_private : boolean ' * is_private : boolean
} }
@ -40,16 +39,16 @@ entity "data.files" as fle {
* id : uuid <<generated>> * id : uuid <<generated>>
-- --
name : varchar(256) name : varchar(256)
* mime_id : smallint * mime : varchar(127)
* datetime : timestamptz * datetime : timestamptz
notes : text notes : text
* metadata : jsonb * metadata : jsonb
' * created_at : timestamptz <<generated>> * created_at : timestamptz <<generated>>
* creator_id : smallint * creator_id : uuid
' * is_private : boolean ' * is_private : boolean
} }
fle::mime_id }o--|| mime::id fle::mime }o--|| mime::name
fle::creator_id }o--|| usr::id fle::creator_id }o--|| usr::id
entity "data.tags" as tag { entity "data.tags" as tag {
@ -59,8 +58,8 @@ entity "data.tags" as tag {
notes : text notes : text
color : char(6) color : char(6)
category_id : uuid category_id : uuid
' * created_at : timestamptz <<generated>> * created_at : timestamptz <<generated>>
* creator_id : smallint * creator_id : uuid
' * is_private : boolean ' * is_private : boolean
} }
@ -91,8 +90,8 @@ entity "data.pools" as pool {
* name : varchar(256) * name : varchar(256)
notes : text notes : text
' parent_id : uuid ' parent_id : uuid
' * created_at : timestamptz * created_at : timestamptz
* creator_id : smallint * creator_id : uuid
' * is_private : boolean ' * is_private : boolean
} }
@ -102,7 +101,7 @@ pool::creator_id }o--|| usr::id
entity "data.file_pool" as fp { entity "data.file_pool" as fp {
* file_id : uuid * file_id : uuid
* pool_id : uuid * pool_id : uuid
* number : smallint * number : integer
} }
fp::file_id }o--|| fle::id fp::file_id }o--|| fle::id
@ -112,7 +111,7 @@ fp::pool_id }o--|| pool::id
' ========== ACCESS ========== ' ========== ACCESS ==========
entity "access.files" as acl_f { entity "access.files" as acl_f {
* user_id : smallint * user_id : uuid
* file_id : uuid * file_id : uuid
-- --
* read : boolean * read : boolean
@ -123,7 +122,7 @@ acl_f::user_id }o--|| usr::id
acl_f::file_id }o--|| fle::id acl_f::file_id }o--|| fle::id
entity "access.tags" as acl_t { entity "access.tags" as acl_t {
* user_id : smallint * user_id : uuid
* tag_id : uuid * tag_id : uuid
-- --
* read : boolean * read : boolean
@ -136,7 +135,7 @@ acl_t::user_id }o--|| usr::id
acl_t::tag_id }o--|| tag::id acl_t::tag_id }o--|| tag::id
entity "access.categories" as acl_c { entity "access.categories" as acl_c {
* user_id : smallint * user_id : uuid
* category_id : uuid * category_id : uuid
-- --
* read : boolean * read : boolean
@ -149,7 +148,7 @@ acl_c::user_id }o--|| usr::id
acl_c::category_id }o--|| cty::id acl_c::category_id }o--|| cty::id
entity "access.pools" as acl_p { entity "access.pools" as acl_p {
* user_id : smallint * user_id : uuid
* pool_id : uuid * pool_id : uuid
-- --
* read : boolean * read : boolean
@ -167,7 +166,7 @@ acl_p::pool_id }o--|| pool::id
entity "activity.sessions" as ssn { entity "activity.sessions" as ssn {
* id : uuid <<generated>> * id : uuid <<generated>>
-- --
* user_id : smallint * user_id : uuid
* user_agent : varchar(512) * user_agent : varchar(512)
* started_at : timestamptz * started_at : timestamptz
expires_at : timestamptz expires_at : timestamptz
@ -179,7 +178,7 @@ ssn::user_id }o--|| usr::id
entity "activity.file_views" as fv { entity "activity.file_views" as fv {
* file_id : uuid * file_id : uuid
* timestamp : timestamptz * timestamp : timestamptz
* user_id : smallint * user_id : uuid
} }
fv::file_id }o--|| fle::id fv::file_id }o--|| fle::id
@ -188,7 +187,7 @@ fv::user_id }o--|| usr::id
entity "activity.tag_uses" as tu { entity "activity.tag_uses" as tu {
* tag_id : uuid * tag_id : uuid
* timestamp : timestamptz * timestamp : timestamptz
* user_id : smallint * user_id : uuid
-- --
* included : boolean * included : boolean
} }
@ -199,7 +198,7 @@ tu::user_id }o--|| usr::id
entity "activity.pool_views" as pv { entity "activity.pool_views" as pv {
* pool_id : uuid * pool_id : uuid
* timestamp : timestamptz * timestamp : timestamptz
* user_id : smallint * user_id : uuid
} }
pv::pool_id }o--|| pool::id pv::pool_id }o--|| pool::id