Files
pokemon/scripts/reindex.ts

15 lines
460 B
TypeScript
Raw Normal View History

import chalk from 'chalk';
import { db, ClosePool } from '../src/db/index.ts';
import * as Indexing from './pokemon-helper.ts';
2026-04-07 22:34:31 -04:00
// await Indexing.createCardCollection();
await Indexing.createSkuCollection();
await Indexing.createInventoryCollection();
2026-04-07 22:34:31 -04:00
// await Indexing.upsertCardCollection(db);
await Indexing.upsertSkuCollection(db);
await Indexing.upsertInventoryCollection(db);
2026-03-12 08:18:40 -04:00
await ClosePool();
console.log(chalk.green('Pokémon reindex complete.'));