MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / hasColumn

Function hasColumn

src/db/migrations.ts:140–140  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

138 // version, as the v6 regression test does).
139 const cols = db.prepare('PRAGMA table_info(unresolved_refs)').all() as Array<{ name: string }>;
140 const hasColumn = (name: string) => cols.some((c) => c.name === name);
141 if (!hasColumn('status')) {
142 db.exec("ALTER TABLE unresolved_refs ADD COLUMN status TEXT NOT NULL DEFAULT 'pending'");
143 }

Callers 1

migrations.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected