This commit is contained in:
2026-10-26 21:32:36 +03:00
parent 0ab3a341aa
commit 551139d628
125 changed files with 1516665 additions and 22 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)
);