Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add backfill scripts

Kiran K8e4a8c58a03e
diff --git a/apps/web/scripts/migrations/backfill-bounties.ts b/apps/web/scripts/migrations/backfill-bounties.ts
new file mode 100644
index 0000000000..dce6ec7ef2
--- /dev/null
+++ b/apps/web/scripts/migrations/backfill-bounties.ts
@@ -0,0 +1,16 @@
+import { prisma } from "@dub/prisma";
+import "dotenv-flow/config";
+
+async function main() {
+ // All existing performance bounties should be all-time stats
+ await prisma.bounty.updateMany({
+ where: {
+ type: "performance",
+ },
+ data: {
+ currentStatsOnly: false,
+ },
+ });
+}
+
+main();