Лабораторная 6: наблюдаемость мессенджера

This commit is contained in:
2026-11-21 11:32:12 +03:00
parent 470d9d6f1e
commit 59a3f96a82
94 changed files with 6746 additions and 35 deletions
+14
View File
@@ -0,0 +1,14 @@
-- Additive migration: compatible with the lab2 schema and existing messages.
CREATE TABLE IF NOT EXISTS message_idempotency (
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
method text NOT NULL,
path text NOT NULL,
key text NOT NULL,
request_hash text NOT NULL,
response_status integer NOT NULL,
response_body jsonb NOT NULL,
created_at timestamptz NOT NULL DEFAULT now(),
PRIMARY KEY (user_id, method, path, key)
);
-- Results are retained indefinitely in this lab (therefore at least 24 hours).
-- There is intentionally no independent cache expiry that could allow duplicates.