feat: database migration system

This commit is contained in:
PandaDEV 2024-12-15 18:50:17 +10:00
parent 2652f26271
commit 8f0d53d355
No known key found for this signature in database
GPG key ID: 13EFF9BAF70EE75C
3 changed files with 86 additions and 15 deletions

View file

@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS settings (
key TEXT PRIMARY KEY,
value TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS history (
id TEXT PRIMARY KEY DEFAULT (lower(hex(randomblob(16)))),
content_type TEXT NOT NULL,
content TEXT NOT NULL,
favicon TEXT,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
);