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
+9
View File
@@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS sessions (
token TEXT PRIMARY KEY,
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
expires_at TIMESTAMPTZ NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_sessions_user ON sessions (user_id);
CREATE INDEX IF NOT EXISTS idx_sessions_expires ON sessions (expires_at);