Manual server file uploads implemented

This commit is contained in:
Magnus Åhall 2026-06-26 08:31:54 +02:00
parent c8308664d3
commit 70b5285e16
10 changed files with 329 additions and 26 deletions

13
sql/00011.sql Normal file
View file

@ -0,0 +1,13 @@
CREATE TABLE public.file (
id serial NOT NULL,
user_id int4 NOT NULL,
uuid uuid NOT NULL,
name varchar DEFAULT '' NOT NULL,
"size" int DEFAULT 0 NOT NULL,
"type" varchar DEFAULT 'application/octet-stream' NOT NULL,
modified timestamptz DEFAULT NOW() NOT NULL,
CONSTRAINT file_pk PRIMARY KEY (id),
CONSTRAINT file_user_fk FOREIGN KEY (user_id) REFERENCES public."user"(id) ON DELETE RESTRICT ON UPDATE RESTRICT
);
ALTER TABLE public.file ADD CONSTRAINT file_user_uuid_unique UNIQUE (user_id,"uuid");

1
sql/00012.sql Normal file
View file

@ -0,0 +1 @@
ALTER TABLE public.file ADD upload_complete bool DEFAULT false NOT NULL;