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 defaultProgramId to WorkspaceSchemaExtended

Steven Teyf43e44839029
diff --git a/apps/web/lib/zod/schemas/workspaces.ts b/apps/web/lib/zod/schemas/workspaces.ts
index a799fd766f..a6194fbd94 100644
--- a/apps/web/lib/zod/schemas/workspaces.ts
+++ b/apps/web/lib/zod/schemas/workspaces.ts
@@ -155,6 +155,7 @@ export const notificationTypes = z.enum([
]);
export const WorkspaceSchemaExtended = WorkspaceSchema.extend({
+ defaultProgramId: z.string().nullable(),
users: z.array(
WorkspaceSchema.shape.users.element.extend({
workspacePreferences: z.record(z.any()).nullish(),
diff --git a/packages/prisma/schema/workspace.prisma b/packages/prisma/schema/workspace.prisma
index 94eaa66f91..a1dbb24098 100644
--- a/packages/prisma/schema/workspace.prisma
+++ b/packages/prisma/schema/workspace.prisma
@@ -4,7 +4,7 @@ model Project {
slug String @unique
logo String?
inviteCode String? @unique
- defaultProgramId String? // default affiliate program ID for the workspace
+ defaultProgramId String? @unique // default affiliate program ID for the workspace
plan String @default("free")
stripeId String? @unique // Stripe subscription ID