ЛР 3 — БВТ-2302 — Сабитов — на 3

This commit is contained in:
2026-12-01 18:09:13 +03:00
parent 0ab3a341aa
commit d79bf5c481
36 changed files with 1944 additions and 36 deletions
+10
View File
@@ -0,0 +1,10 @@
CREATE TABLE message_requests (
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
chat_id uuid NOT NULL REFERENCES chats(id) ON DELETE CASCADE,
request_key varchar(128) NOT NULL,
body_hash char(64) NOT NULL,
message_id uuid NOT NULL REFERENCES messages(id) ON DELETE CASCADE,
expires_at timestamptz NOT NULL,
PRIMARY KEY (user_id, chat_id, request_key)
);
CREATE INDEX idx_message_requests_expiry ON message_requests(expires_at);