From 4a7b9e2a0996d69ea82a57f89e0c5664c6985eee Mon Sep 17 00:00:00 2001 From: xCyanGrizzly Date: Thu, 23 Jul 2026 14:20:07 +0200 Subject: [PATCH] feat(db): IngestionRun.zipsBackfilled counter Additive migration (applied on deploy via prisma migrate deploy). Counts packages whose provenance was backfilled during an ingestion run. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../migration.sql | 5 +++++ prisma/schema.prisma | 1 + 2 files changed, 6 insertions(+) create mode 100644 prisma/migrations/20260723000000_ingestion_run_zips_backfilled/migration.sql diff --git a/prisma/migrations/20260723000000_ingestion_run_zips_backfilled/migration.sql b/prisma/migrations/20260723000000_ingestion_run_zips_backfilled/migration.sql new file mode 100644 index 0000000..f13b9b4 --- /dev/null +++ b/prisma/migrations/20260723000000_ingestion_run_zips_backfilled/migration.sql @@ -0,0 +1,5 @@ +-- AlterTable: count of packages whose provenance was backfilled during a run +-- (opportunistic cross-channel provenance backfill). Additive, non-null with a +-- default of 0 — no data change for existing rows. +ALTER TABLE "ingestion_runs" + ADD COLUMN "zipsBackfilled" INTEGER NOT NULL DEFAULT 0; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 679a74e..c25b8ce 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -569,6 +569,7 @@ model IngestionRun { zipsFound Int @default(0) zipsDuplicate Int @default(0) zipsIngested Int @default(0) + zipsBackfilled Int @default(0) errorMessage String? // Live activity tracking — written by worker in real-time