feat: implement lab4 persistent attachments and replicated API

This commit is contained in:
Fedoroff
2026-11-11 21:45:09 +03:00
parent ec540a1a72
commit 827d9c577d
44 changed files with 3507 additions and 31 deletions
+9
View File
@@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS message_idempotency (
sender_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
chat_id UUID NOT NULL REFERENCES chats(id) ON DELETE CASCADE,
idem_key VARCHAR(128) NOT NULL,
text TEXT NOT NULL,
message_id UUID NOT NULL UNIQUE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
PRIMARY KEY (sender_id, chat_id, idem_key)
);