The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update migrate-discounts.ts
Steven Teyf586e30c79e2
diff --git a/apps/web/scripts/migrate-discounts.ts b/apps/web/scripts/migrate-discounts.tsindex 3c26a2471f..0cd49ce7b9 100644--- a/apps/web/scripts/migrate-discounts.ts+++ b/apps/web/scripts/migrate-discounts.ts@@ -1,4 +1,4 @@-// @ts-nocheck – this is a one-time migration script for+// this is a one-time migration script for// when we migrate the program-wide discounts to the new schemaimport { prisma } from "@dub/prisma";@@ -8,9 +8,6 @@ async function main() {// Migrate program-wide discountsconst programDiscounts = await prisma.discount.findMany({where: {- defaultForProgram: {- isNot: null,- },default: false,},select: {@@ -49,6 +46,7 @@ async function main() {const res2 = await prisma.programEnrollment.updateMany({where: {programId: discount.programId,+ discountId: null,},data: {discountId,