feat:lab3-catchup

This commit is contained in:
Оля Мороз
2026-11-02 12:35:30 +03:00
parent ec540a1a72
commit 185f092f7a
25 changed files with 2011 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
CREATE TABLE IF NOT EXISTS idempotency_keys (
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,
status_code INTEGER NOT NULL,
response JSONB NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
PRIMARY KEY (user_id, method, path, key)
);
CREATE INDEX IF NOT EXISTS idx_idempotency_created
ON idempotency_keys (created_at);