ЛР 3: Балансировка API и отказ реплики

This commit is contained in:
2026-12-02 00:16:41 +03:00
parent 0ab3a341aa
commit 25f666a3e8
22 changed files with 993 additions and 18 deletions
+6
View File
@@ -0,0 +1,6 @@
CREATE TABLE sessions (
token_hash CHAR(64) PRIMARY KEY,
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
expires_at TIMESTAMPTZ NOT NULL CHECK (expires_at > created_at)
);