Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/web/scripts/migrations/migrate-reward-amounts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-nocheck – contains old schema code

import { RewardConditions } from "@/lib/types";
import { prisma } from "@dub/prisma";
import { Prisma } from "@prisma/client";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/scripts/migrations/migrate-rewards-remainder.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @ts-nocheck
// @ts-nocheck – contains old schema code

import { prisma } from "@dub/prisma";
import "dotenv-flow/config";
Expand Down
4 changes: 0 additions & 4 deletions packages/prisma/schema/program.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ model ProgramEnrollment {
daysSinceLastConversion Int? // days since lastConversionAt
consistencyScore Int? // based on daysSinceLastConversion

// deprecated stats
leadConversionRate Float? // TODO: Remove after migration
conversionRate Float? // TODO: Remove after migration

createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
customerDataSharingEnabledAt DateTime?
Expand Down
1 change: 0 additions & 1 deletion packages/prisma/schema/reward.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ model Reward {
type RewardStructure @default(percentage)
amountInCents Int?
amountInPercentage Decimal? @db.Decimal(5, 2)
amount Int @default(0) // TODO: Remove after migration
maxDuration Int? // in months (0 -> not recurring, null -> infinite)
modifiers Json? @db.Json
createdAt DateTime @default(now())
Expand Down