feat: sync rich text message support

This commit is contained in:
A 2026-07-04 21:15:35 +08:00
parent 4d3bbeabd8
commit 7c9d8dda16
41 changed files with 1164 additions and 94 deletions

View file

@ -0,0 +1,22 @@
ALTER TABLE public.channel_messages
DROP CONSTRAINT IF EXISTS channel_messages_content_check;
ALTER TABLE public.channel_messages
ADD CONSTRAINT channel_messages_content_check
CHECK (
body <> ''::text
OR action <> '{}'::jsonb
OR media <> '{}'::jsonb
OR rich_message <> '{}'::jsonb
);
ALTER TABLE public.private_messages
DROP CONSTRAINT IF EXISTS private_messages_nonempty_body;
ALTER TABLE public.private_messages
ADD CONSTRAINT private_messages_nonempty_body
CHECK (
body <> ''::text
OR media <> '{}'::jsonb
OR rich_message <> '{}'::jsonb
);