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

This commit is contained in:
Krep4334
2026-11-13 18:22:54 +03:00
parent ec540a1a72
commit f6288b068e
28 changed files with 1634 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);