ЛР 4: S3-вложения, доступ и отказоустойчивость — на 3

This commit is contained in:
2026-11-20 18:13:30 +03:00
parent ec540a1a72
commit 1e18644624
34 changed files with 1929 additions and 33 deletions
+9
View File
@@ -0,0 +1,9 @@
CREATE TABLE message_idempotency (
user_id uuid NOT NULL REFERENCES users(id),
method text NOT NULL,
chat_id uuid NOT NULL REFERENCES chats(id),
key text NOT NULL CHECK (key COLLATE "C" ~ '^[A-Za-z0-9._:-]{1,128}$'),
message_id uuid NOT NULL REFERENCES messages(id) DEFERRABLE INITIALLY DEFERRED,
expires_at timestamptz NOT NULL,
PRIMARY KEY (user_id, method, chat_id, key)
);