Реализовать лабораторную 3

This commit is contained in:
Krep4334
2026-11-13 18:22:52 +03:00
parent 0ab3a341aa
commit 2a4242695f
23 changed files with 1121 additions and 40 deletions
+11
View File
@@ -0,0 +1,11 @@
CREATE TABLE message_requests (
actor_id uuid NOT NULL REFERENCES users(id),
chat_id uuid NOT NULL REFERENCES chats(id),
key text NOT NULL,
fingerprint bytea NOT NULL,
message_id uuid NOT NULL REFERENCES messages(id),
expires_at timestamptz NOT NULL,
PRIMARY KEY (actor_id, chat_id, key)
);
CREATE INDEX message_requests_expiry_idx ON message_requests (expires_at);