This commit is contained in:
root
2025-10-22 14:58:09 +00:00
parent e607310689
commit ac57b932c2
2 changed files with 15 additions and 10 deletions
-10
View File
@@ -1,15 +1,5 @@
import { db } from './index.js';
const CREATE_TABLE_SQL = `
CREATE TABLE IF NOT EXISTS settings (
key TEXT PRIMARY KEY,
value TEXT,
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
)
`;
db.prepare(CREATE_TABLE_SQL).run();
const getSettingStmt = db.prepare('SELECT key, value, updated_at FROM settings WHERE key = ?');
const setSettingStmt = db.prepare(`
INSERT INTO settings (key, value, updated_at)