fix issues

This commit is contained in:
2026-07-22 17:59:21 +08:00
parent b7605fcf34
commit 17385335fd
3 changed files with 15 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ db.exec(`
freight REAL DEFAULT 0,
payment_method TEXT DEFAULT '未指定',
invoice_type TEXT DEFAULT '无票',
status TEXT DEFAULT '待处理',
status TEXT DEFAULT '待付款',
applicant TEXT,
remarks TEXT DEFAULT '',
created_at TEXT DEFAULT (datetime('now','localtime')),
@@ -92,4 +92,7 @@ for (const sql of migrations) {
try { db.exec(sql); } catch (e) { /* 列已存在 */ }
}
// 统一存量状态值
try { db.exec("UPDATE purchases SET status = '待付款' WHERE status = '待处理'"); } catch (e) {}
module.exports = db;