MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / constructor

Method constructor

src/schedule/store.ts:90–99  ·  view source on GitHub ↗
(dbPath: string = QODEX_SESSION_DB)

Source from the content-addressed store, hash-verified

88 private db: Database.Database;
89
90 constructor(dbPath: string = QODEX_SESSION_DB) {
91 this.db = openDatabase(dbPath);
92 this.db.exec(SCHEMA);
93 // Migrate DBs created before deliver/recipe existed. ADD COLUMN throws on an existing
94 // column, so each is guarded — idempotent and safe to run every startup.
95 for (const col of ['deliver TEXT', 'recipe TEXT']) {
96 try { this.db.exec(`ALTER TABLE schedules ADD COLUMN ${col}`); } catch { /* already present */ }
97 }
98 try { this.db.exec(`ALTER TABLE schedule_runs ADD COLUMN receipt TEXT`); } catch { /* already present */ }
99 }
100
101 add(input: {
102 name: string;

Callers

nothing calls this directly

Calls 1

openDatabaseFunction · 0.85

Tested by

no test coverage detected