исправления

This commit is contained in:
2026-11-06 17:33:49 +03:00
parent a7d4764c6d
commit ab56a4512d
5 changed files with 58 additions and 29 deletions
+3 -1
View File
@@ -22,4 +22,6 @@ CREATE TABLE message_attachments (
CREATE INDEX idx_message_attachments_attachment ON message_attachments (attachment_id);
ALTER TABLE messages DROP CONSTRAINT text_length;
ALTER TABLE messages ADD CONSTRAINT text_length CHECK (char_length(text) <= 4000);
ALTER TABLE messages ADD CONSTRAINT text_length CHECK (
bytea_utf8_char_length(text) BETWEEN 0 AND 4000
);