4 Commits

2 changed files with 12 additions and 10 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import (
type User struct {
Name string `json:"name"`
IsAdmin bool `json:"isAdmin"`
CanCreate bool `json:"canCreate"`
}
type MIME struct {
@@ -50,7 +51,7 @@ type (
CreatedAt time.Time `json:"createdAt"`
Creator User `json:"creator"`
Notes pgtype.Text `json:"notes"`
Metadata *json.RawMessage `json:"metadata"`
Metadata json.RawMessage `json:"metadata"`
Tags []TagCore `json:"tags"`
Viewed int `json:"viewed"`
}
+3 -2
View File
@@ -304,7 +304,7 @@ CREATE TABLE data.files (
mime_id smallint NOT NULL,
datetime timestamp with time zone DEFAULT clock_timestamp() NOT NULL,
notes text,
metadata jsonb,
metadata jsonb NOT NULL,
creator_id smallint NOT NULL,
is_deleted boolean DEFAULT false NOT NULL
);
@@ -375,7 +375,8 @@ CREATE TABLE system.users (
id smallint NOT NULL,
name character varying(32) NOT NULL,
password text NOT NULL,
is_admin boolean DEFAULT false NOT NULL
is_admin boolean DEFAULT false NOT NULL,
can_create boolean DEFAULT false NOT NULL
);