SPB Git forge
38commits 1branches 0releases
338.7 MBsize
maindefault branch
3 h agolast push
HTML 53.9% TypeScript 44.5% JavaScript 0.6% SQL 0.5%
645 B · 20 lines typescript
Raw Blame History
1/**2 * `pnpm db:seed` — load reference data (ISO countries, data-center metros) idempotently.3 * The seed tables live with the ingest layer (apps/worker/src/seeds) so the worker can also refresh them at boot;4 * this runner only wires them to the database client.5 */6import { closeDb, getDb } from "./index.js";7import { seedReferenceData } from "../../../apps/worker/src/seeds/index.js";89async function main() {10  const db = getDb();11  const r = await seedReferenceData(db);12  console.log(`seed: ${r.countries} countries, ${r.metros} metros upserted`);13  await closeDb();14}1516main().catch((e) => {17  console.error(e);18  process.exit(1);19});20