feat: sync rich text message support
This commit is contained in:
parent
4d3bbeabd8
commit
7c9d8dda16
41 changed files with 1164 additions and 94 deletions
20
deploy/migrations/0050_rich_message_content_checks.down.sql
Normal file
20
deploy/migrations/0050_rich_message_content_checks.down.sql
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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
|
||||
);
|
||||
|
||||
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
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue