Лаба 4: вложения в S3, уровни 3-5, reconciler (трек 2)

This commit is contained in:
2026-11-14 09:19:07 +03:00
parent ec540a1a72
commit 0dc99c9e33
63 changed files with 4810 additions and 18 deletions
+13
View File
@@ -0,0 +1,13 @@
-- 002: общая идемпотентность отправки сообщений
CREATE TABLE IF NOT EXISTS idempotency_keys (
user_id uuid NOT NULL REFERENCES users (id),
method text NOT NULL,
path text NOT NULL,
idem_key text NOT NULL,
request_hash bytea NOT NULL, -- SHA-256 канонического тела
message_id uuid REFERENCES messages (id),
created_at timestamptz NOT NULL DEFAULT now(),
PRIMARY KEY (user_id, method, path, idem_key)
);
CREATE INDEX IF NOT EXISTS idempotency_created_idx ON idempotency_keys (created_at);