Реализовать lab5 на оценку 4: async attachments, outbox, worker и variants.

This commit is contained in:
Mikhail Verkovykh
2026-11-19 20:47:08 +03:00
parent 276dbdad8a
commit 92c67c23c0
86 changed files with 10148 additions and 30 deletions
+18
View File
@@ -0,0 +1,18 @@
-- Lab5 ops hardening: durable session revocation + indexes for janitor/replay.
CREATE TABLE IF NOT EXISTS session_revocations (
token_hash TEXT PRIMARY KEY,
revoked_at TIMESTAMPTZ NOT NULL DEFAULT now(),
expires_at TIMESTAMPTZ NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_session_revocations_expires
ON session_revocations (expires_at);
-- Attachments may keep staging_key while queued/processing; janitor must see it.
CREATE INDEX IF NOT EXISTS idx_attachments_staging_key
ON attachments (staging_key)
WHERE staging_key IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_attachments_status
ON attachments (status);