add base of lab3

This commit is contained in:
2026-11-07 16:14:59 +03:00
parent ec540a1a72
commit c43be66343
64 changed files with 4194 additions and 0 deletions
@@ -0,0 +1,9 @@
CREATE TABLE message_idempotency (
user_id UUID NOT NULL REFERENCES users(id),
chat_id UUID NOT NULL REFERENCES chats(id),
key VARCHAR(128) COLLATE "C" NOT NULL,
request_text TEXT NOT NULL,
message_id UUID NOT NULL UNIQUE REFERENCES messages(id),
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
PRIMARY KEY (user_id, chat_id, key)
);