feat: sync built-in sticker bot

This commit is contained in:
A 2026-07-01 21:55:55 +08:00
parent 7096625e13
commit 6867d201ed
60 changed files with 7063 additions and 144 deletions

View file

@ -0,0 +1,17 @@
ALTER TABLE public.sticker_sets
ADD COLUMN IF NOT EXISTS creator_user_id bigint DEFAULT 0 NOT NULL,
ADD COLUMN IF NOT EXISTS text_color boolean DEFAULT false NOT NULL,
ADD COLUMN IF NOT EXISTS deleted boolean DEFAULT false NOT NULL,
ADD COLUMN IF NOT EXISTS software text DEFAULT ''::text NOT NULL,
ADD COLUMN IF NOT EXISTS keywords jsonb DEFAULT '[]'::jsonb NOT NULL,
ADD COLUMN IF NOT EXISTS updated_at timestamp with time zone DEFAULT now() NOT NULL;
DROP INDEX IF EXISTS public.sticker_sets_short_name_idx;
CREATE UNIQUE INDEX IF NOT EXISTS sticker_sets_short_name_lower_idx
ON public.sticker_sets USING btree (lower(short_name))
WHERE (short_name <> ''::text AND deleted = false);
CREATE INDEX IF NOT EXISTS sticker_sets_creator_idx
ON public.sticker_sets USING btree (creator_user_id, id DESC)
WHERE (creator_user_id <> 0 AND deleted = false);