ЛР 4: MinIO и вложения

This commit is contained in:
2026-12-02 03:15:11 +03:00
parent ec540a1a72
commit 41ffdcb1b3
27 changed files with 1711 additions and 19 deletions
+7
View File
@@ -0,0 +1,7 @@
CREATE TABLE messages (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
chat_id UUID NOT NULL REFERENCES chats(id) ON DELETE CASCADE,
sender_id UUID NOT NULL REFERENCES users(id) ON DELETE RESTRICT,
text TEXT NOT NULL CHECK (char_length(text) BETWEEN 1 AND 4000 AND btrim(text) <> ''),
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);