feat: T27 AuthService DB session persistence - replace in-memory Map with SQLite sessions table

This commit is contained in:
2026-06-26 14:55:38 +02:00
parent 04271d4cbd
commit 1d6c2cb30e
4 changed files with 59 additions and 17 deletions
+9
View File
@@ -83,6 +83,15 @@ CREATE TABLE IF NOT EXISTS blocks (
FOREIGN KEY (drawing_id) REFERENCES drawings(id) ON DELETE CASCADE
);
-- ─── Sessions ──────────────────────────────────────
CREATE TABLE IF NOT EXISTS sessions (
token TEXT PRIMARY KEY,
user_id TEXT NOT NULL,
expires_at INTEGER NOT NULL,
created_at TEXT NOT NULL DEFAULT (datetime('now')),
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);
-- ─── Settings ───────────────────────────────────────
CREATE TABLE IF NOT EXISTS settings (
key TEXT PRIMARY KEY,