import { openDb } from "../server/src/db.js"; import { loadConfig } from "../server/src/config.js"; const db = openDb(loadConfig().dbPath); for (const slug of ["oskar-lumo","oskar-tilia"]) { const p = db.prepare("SELECT id FROM products WHERE slug=?").get(slug) as {id:string}; console.log("===",slug,"shot_refs ==="); for (const r of db.prepare("SELECT id,shot_role,source_id,ref_kind FROM shot_refs WHERE product_id=? ORDER BY shot_role").all(p.id) as Array<{id:string;shot_role:string;source_id:string;ref_kind:string}>) console.log(r.id, r.shot_role, r.source_id.slice(0,22), r.ref_kind); console.log("=== assets ==="); for (const r of db.prepare("SELECT id,role,sha256 FROM assets WHERE product_id=? AND variant_id IS NULL AND status='candidate'").all(p.id) as Array<{id:string;role:string;sha256:string}>) console.log(r.id, r.role, r.sha256.slice(0,16)); }