This commit is contained in:
2026-10-01 00:58:00 +02:00
parent 61d86cf727
commit 3a88bb6ad3
14 changed files with 1076 additions and 43 deletions
+32
View File
@@ -291,6 +291,8 @@ DROP TABLE IF EXISTS public.global_chat;
DROP TABLE IF EXISTS public.favorites;
DROP SEQUENCE IF EXISTS public.dm_attachments_id_seq;
DROP TABLE IF EXISTS public.dm_attachments;
DROP TABLE IF EXISTS public.chat_uploads;
DROP TABLE IF EXISTS public.upload_api_keys;
DROP SEQUENCE IF EXISTS public.discord_queue_id_seq;
DROP TABLE IF EXISTS public.discord_queue;
DROP SEQUENCE IF EXISTS public.custom_emojis_id_seq;
@@ -3706,6 +3708,36 @@ CREATE INDEX IF NOT EXISTS idx_sqc_scores_map ON public.sqc_scores(map_id, score
CREATE PUBLICATION alltables FOR ALL TABLES WITH (publish = 'insert, update, delete, truncate');
--
-- Name: upload_api_keys, chat_uploads; temporary chat file hosting (mumh5)
--
CREATE TABLE IF NOT EXISTS public.upload_api_keys (
id serial PRIMARY KEY,
name text NOT NULL,
key_hash text NOT NULL UNIQUE,
max_bytes bigint DEFAULT NULL,
revoked boolean DEFAULT false NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
last_used_at timestamp with time zone
);
CREATE TABLE IF NOT EXISTS public.chat_uploads (
id bigserial PRIMARY KEY,
slug text NOT NULL UNIQUE,
key_id integer REFERENCES public.upload_api_keys(id) ON DELETE SET NULL,
original_name text DEFAULT ''::text NOT NULL,
mime text NOT NULL,
mime_hint text DEFAULT ''::text NOT NULL,
size_bytes bigint DEFAULT 0 NOT NULL,
delete_token_hash text NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
expires_at timestamp with time zone NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_chat_uploads_expires_at ON public.chat_uploads(expires_at);
--
-- PostgreSQL database dump complete
--