Лабораторная 7

This commit is contained in:
MacBook
2026-11-24 12:20:21 +03:00
parent 20afc2c790
commit b962fa0d5d
99 changed files with 11329 additions and 107 deletions
@@ -0,0 +1,13 @@
CREATE TABLE message_idempotency (
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
method text NOT NULL,
path text NOT NULL,
idempotency_key text NOT NULL,
request_hash bytea NOT NULL,
message_id uuid REFERENCES messages(id) ON DELETE CASCADE,
created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
PRIMARY KEY (user_id, method, path, idempotency_key)
);
CREATE INDEX message_idempotency_created_at_idx
ON message_idempotency (created_at);