added full gifts support

This commit is contained in:
onysd 2026-08-07 10:04:13 +03:00
parent ea5b86de8f
commit 354128c106
35 changed files with 1502 additions and 103 deletions

View file

@ -0,0 +1,17 @@
-- Admin-curated GIF catalog: what @gif (see 20260807120000) serves as inline
-- results for the client's GIF picker. document_id/document_ids are loose
-- bigint references (no FK), matching every other media table in this schema
-- (e.g. sticker_sets.thumb_document_id) -- documents are immutable once
-- created, so there is nothing to cascade.
CREATE TABLE public.gif_catalog (
id bigint PRIMARY KEY,
title text DEFAULT ''::text NOT NULL,
document_id bigint NOT NULL,
enabled boolean DEFAULT true NOT NULL,
sort_order integer DEFAULT 0 NOT NULL,
created_by text DEFAULT ''::text NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL
);
CREATE INDEX gif_catalog_enabled_sort_idx ON public.gif_catalog (enabled, sort_order, id);