Lab 6: track - 1

This commit is contained in:
2026-11-23 14:54:48 +03:00
parent 470d9d6f1e
commit a271ddd156
39 changed files with 3141 additions and 15 deletions
+6
View File
@@ -0,0 +1,6 @@
CREATE TABLE idempotency (
user_id uuid NOT NULL REFERENCES users, chat_id uuid NOT NULL REFERENCES chats,
key varchar(128) NOT NULL, body text NOT NULL, response jsonb NOT NULL,
expires_at timestamptz NOT NULL, PRIMARY KEY(user_id,chat_id,key)
);
CREATE INDEX idempotency_expiry ON idempotency(expires_at);