ЛР4 - БПИ2303 - Стругов - на 4

This commit is contained in:
wanderinho
2026-11-22 22:11:48 +03:00
parent ec540a1a72
commit 0a942ff3ba
32 changed files with 4387 additions and 25 deletions
+7
View File
@@ -0,0 +1,7 @@
CREATE TABLE message_idempotency (
user_id uuid NOT NULL REFERENCES users(id), chat_id uuid NOT NULL REFERENCES chats(id),
key text NOT NULL, body_fingerprint text NOT NULL,
message_id uuid REFERENCES messages(id), expires_at timestamptz NOT NULL,
PRIMARY KEY(user_id,chat_id,key)
);
CREATE INDEX message_idempotency_expiry_idx ON message_idempotency(expires_at);