Перенес основы lab3 в lab4

This commit is contained in:
Daria0w0
2026-11-06 14:44:30 +03:00
parent ec540a1a72
commit 9197e151ba
59 changed files with 4761 additions and 3 deletions
+8
View File
@@ -0,0 +1,8 @@
CREATE TABLE message_keys (
user_id UUID NOT NULL REFERENCES users(id),
chat_id UUID NOT NULL REFERENCES chats(id),
key TEXT NOT NULL CHECK (key ~ '^[A-Za-z0-9._:-]{1,128}$'),
message_id UUID NOT NULL REFERENCES messages(id),
expires_at TIMESTAMPTZ NOT NULL,
PRIMARY KEY (user_id, chat_id, key)
);