feat: T27 AuthService DB session persistence - replace in-memory Map with SQLite sessions table
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user