Files
mtusi2026lab6-fork/src/backend/repositories/migrations/000004_attachments.down.sql
T

6 lines
296 B
SQL

-- An operator must first remove attachment-only messages before this rollback.
ALTER TABLE messages DROP CONSTRAINT messages_text_check;
ALTER TABLE messages ADD CONSTRAINT messages_text_check CHECK (char_length(text) BETWEEN 1 AND 4000);
DROP TABLE message_attachments;
DROP TABLE attachments;