Files
mtusi2026lab7/migrations/004_allow_empty_message_text.sql
T
allerg1q c188a3beca
Skeleton contracts / contracts (pull_request) Blocked by required conditions
feat(lab7): implement secure messenger infrastructure with TLS, OpenBao and observability
2026-11-29 18:06:02 +03:00

14 lines
351 B
SQL

-- Lab4: messages with attachments may have empty text.
-- The API checks that a message contains text or attachments.
ALTER TABLE messages
DROP CONSTRAINT IF EXISTS message_length;
ALTER TABLE messages
DROP CONSTRAINT IF EXISTS message_not_blank;
ALTER TABLE messages
ADD CONSTRAINT message_length
CHECK (char_length(text) <= 4000);