This commit is contained in:
2026-10-30 16:39:32 +03:00
parent 0ab3a341aa
commit 117a7783aa
28 changed files with 1049 additions and 37 deletions
+11
View File
@@ -0,0 +1,11 @@
CREATE TABLE message_requests (
sender_id UUID NOT NULL REFERENCES users(id),
chat_id UUID NOT NULL REFERENCES chats(id),
request_key VARCHAR(128) NOT NULL,
request_hash CHAR(64) NOT NULL,
message_id UUID REFERENCES messages(id),
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
PRIMARY KEY (sender_id, chat_id, request_key)
);
CREATE INDEX message_requests_created_idx ON message_requests (created_at);