feat: sync built-in sticker bot
This commit is contained in:
parent
7096625e13
commit
6867d201ed
60 changed files with 7063 additions and 144 deletions
17
deploy/migrations/0042_sticker_set_creator.up.sql
Normal file
17
deploy/migrations/0042_sticker_set_creator.up.sql
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue