feat: move database logic to new structure

This commit is contained in:
PandaDEV 2024-12-11 14:53:01 +10:00
parent add822073e
commit c60f173e29
No known key found for this signature in database
GPG key ID: 13EFF9BAF70EE75C
10 changed files with 198 additions and 352 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
);