feat(database): add account-scoped database manager

This commit is contained in:
Codex committed 2026-09-28 18:55:30 +08:00
1 parent 1606c41f43
commit 33e80a566e
18 files changed
+444 -25

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
CREATE TABLE lifeos_admin_sessions (
token_hash TEXT PRIMARY KEY,
user_id TEXT NOT NULL,
expires_at INTEGER NOT NULL
);
CREATE INDEX idx_lifeos_admin_sessions_user ON lifeos_admin_sessions(user_id);
CREATE TABLE lifeos_admin_attempts (
user_id TEXT PRIMARY KEY,
failures INTEGER NOT NULL DEFAULT 0,
locked_until INTEGER NOT NULL DEFAULT 0
);
+7
View File
@@ -15,6 +15,13 @@
"when": 1790640000000,
"tag": "0001_lifeos_records",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1790649000000,
"tag": "0002_lifeos_db_admin",
"breakpoints": true
}
]
}