fix: 优化留言和分享数据
This commit is contained in:
11
server/db.js
11
server/db.js
@@ -193,4 +193,15 @@ try {
|
||||
`)
|
||||
} catch (_) {}
|
||||
|
||||
// 分享次数:累计分享次数
|
||||
try {
|
||||
db.exec(`
|
||||
CREATE TABLE IF NOT EXISTS share_count (
|
||||
id INTEGER PRIMARY KEY CHECK (id = 1),
|
||||
total INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
INSERT OR IGNORE INTO share_count (id, total) VALUES (1, 0);
|
||||
`)
|
||||
} catch (_) {}
|
||||
|
||||
module.exports = db
|
||||
|
||||
Reference in New Issue
Block a user