refactor(db,persistence): unify EventStore and WorkflowAlertStore onto core/db SQLite
This commit is contained in:
1 parent
5a0c277993
commit
3864f0ffd0
7 files changed
+228
-34
No files matched your search
@@ -37,6 +37,8 @@ describe("Core DB - 数据库连接与结构化迁移机制 (加固测试)", ()
|
||||
expect(tableNames.has("approval_findings")).toBe(true);
|
||||
expect(tableNames.has("aipro_logs")).toBe(true);
|
||||
expect(tableNames.has("cache_entries")).toBe(true);
|
||||
expect(tableNames.has("observed_events")).toBe(true);
|
||||
expect(tableNames.has("workflow_error_alerts")).toBe(true);
|
||||
|
||||
// 检查加固索引:UPPER(short_id)、findings(rule_id)
|
||||
const indices = db
|
||||
@@ -51,6 +53,8 @@ describe("Core DB - 数据库连接与结构化迁移机制 (加固测试)", ()
|
||||
expect(indexNames.has("idx_findings_rule_id")).toBe(true);
|
||||
expect(indexNames.has("idx_cache_namespace")).toBe(true);
|
||||
expect(indexNames.has("idx_cache_expires_at")).toBe(true);
|
||||
expect(indexNames.has("idx_observed_events_scope")).toBe(true);
|
||||
expect(indexNames.has("idx_workflow_alerts_scope")).toBe(true);
|
||||
});
|
||||
|
||||
test("cache_entries 具备复合主键 (namespace, key) 约束", () => {
|
||||
|
||||
Reference in new issue
Block a user