(name: string)
| 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 | } |