MCPcopy Create free account
hub / github.com/MemTensor/MemOS / migrateTaskSkillMeta

Method migrateTaskSkillMeta

packages/memos-core/src/storage/sqlite.ts:580–587  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

578 }
579
580 private migrateTaskSkillMeta(): void {
581 const cols = this.db.prepare("PRAGMA table_info(tasks)").all() as Array<{ name: string }>;
582 if (!cols.some((c) => c.name === "skill_status")) {
583 this.db.exec("ALTER TABLE tasks ADD COLUMN skill_status TEXT DEFAULT NULL");
584 this.db.exec("ALTER TABLE tasks ADD COLUMN skill_reason TEXT DEFAULT NULL");
585 this.log.info("Migrated: added skill_status/skill_reason columns to tasks");
586 }
587 }
588
589 setTaskSkillMeta(taskId: string, meta: { skillStatus: string; skillReason: string }): void {
590 this.db.prepare("UPDATE tasks SET skill_status = ?, skill_reason = ?, updated_at = ? WHERE id = ?")

Callers 1

migrateMethod · 0.95

Calls 4

allMethod · 0.80
prepareMethod · 0.80
execMethod · 0.80
infoMethod · 0.65

Tested by

no test coverage detected