diff --git a/scripts/migration/pdfScreenshotIndexing.js b/scripts/migration/pdfScreenshotIndexing.js index a7659cf..422085b 100644 --- a/scripts/migration/pdfScreenshotIndexing.js +++ b/scripts/migration/pdfScreenshotIndexing.js @@ -77,6 +77,8 @@ async function pdfScreenshotIndexing() { orderBy: { id: "asc" }, }); + let counter = 0; + // PDFs for (let link of links) { const path = `archives/${link.collectionId}/${link.id}.pdf`; @@ -88,12 +90,15 @@ async function pdfScreenshotIndexing() { where: { id: link.id }, data: { pdf: path }, }); - console.log(`${link.id}`); - } else { - console.log(`${link.id}`); } + + console.log("count:", counter, "id:", link.id, "PDF"); + + counter++; } + counter = 0; + // Screenshots (PNGs) for (let link of links) { const path = `archives/${link.collectionId}/${link.id}.png`; @@ -105,12 +110,15 @@ async function pdfScreenshotIndexing() { where: { id: link.id }, data: { image: path }, }); - console.log(`${link.id}`); - } else { - console.log(`${link.id}`); } + + console.log("count:", counter, "id:", link.id, "PNG"); + + counter++; } + counter = 0; + // Screenshots (JPEGs) for (let link of links) { const path = `archives/${link.collectionId}/${link.id}.jpeg`; @@ -122,10 +130,11 @@ async function pdfScreenshotIndexing() { where: { id: link.id }, data: { image: path }, }); - console.log(`${link.id}`); - } else { - console.log(`${link.id}`); } + + console.log("count:", counter, "id:", link.id, "JPEG"); + + counter++; } await prisma.$disconnect();