上线单个审计覆盖索引并严格核验旧库的结构增量

This commit is contained in:
黄健铭 committed 2026-12-05 19:39:07 -08:00
1 parent cf0b0be83f
commit 240452d8a1
5 files changed
+230 -6

No files matched your search

+1
View File
@@ -317,6 +317,7 @@ class Ledger {
CREATE INDEX IF NOT EXISTS ix_payment_order ON payments(order_id);
CREATE INDEX IF NOT EXISTS ix_journal_date ON journal(date);
CREATE INDEX IF NOT EXISTS ix_after_sales_date ON after_sales(date);
CREATE INDEX IF NOT EXISTS ix_audit_entity_action_id ON audit(entity,action,id);
`);
// 增量升级旧库,不改写历史订单金额、单号和成本。
const columns = this.rows('PRAGMA table_info(orders)').map(r => r.name);