The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
SharedDashboard → Dashboard
Steven Tey670cec7229ee
diff --git a/apps/web/prisma/schema/dashboard.prisma b/apps/web/prisma/schema/dashboard.prismanew file mode 100644index 0000000000..b214df79ff--- /dev/null+++ b/apps/web/prisma/schema/dashboard.prisma@@ -0,0 +1,26 @@+model Dashboard {+ id String @id @default(cuid())++ link Link? @relation(fields: [linkId], references: [id], onUpdate: Cascade, onDelete: Cascade)+ linkId String? @unique++ // Project that the share link belongs to+ project Project? @relation(fields: [projectId], references: [id], onUpdate: Cascade, onDelete: Cascade)+ projectId String?++ // User who created the shared dashboard+ user User? @relation(fields: [userId], references: [id], onUpdate: Cascade, onDelete: Cascade)+ userId String?++ // additional link configurations+ doIndex Boolean @default(false) // whether to index the share link on Google or not+ password String? // password to access the share link+ showConversions Boolean @default(false) // ideally this should just be synced to trackConversion on the link++ createdAt DateTime @default(now())+ updatedAt DateTime @updatedAt++ @@index(linkId)+ @@index(projectId)+ @@index(userId)+}diff --git a/apps/web/prisma/schema/link.prisma b/apps/web/prisma/schema/link.prismaindex 60bd169aa9..bb67803a4b 100644--- a/apps/web/prisma/schema/link.prisma+++ b/apps/web/prisma/schema/link.prisma@@ -63,7 +63,7 @@ model Link {// Comments on the particular shortlinkcomments String? @db.LongText- sharedDashboard SharedDashboard?+ dashboard Dashboard?@@unique([domain, key])@@unique([projectId, externalId])@@ -79,31 +79,4 @@ model Link {@@index(lastClicked)@@index(userId)@@fulltext([key, url])-}--model SharedDashboard {- id String @id @default(cuid())-- link Link? @relation(fields: [linkId], references: [id], onUpdate: Cascade, onDelete: Cascade)- linkId String? @unique-- // Project that the share link belongs to- project Project? @relation(fields: [projectId], references: [id], onUpdate: Cascade, onDelete: Cascade)- projectId String?-- // User who created the shared dashboard- user User? @relation(fields: [userId], references: [id], onUpdate: Cascade, onDelete: Cascade)- userId String?-- // additional link configurations- doIndex Boolean @default(false) // whether to index the share link on Google or not- password String? // password to access the share link- showConversions Boolean @default(false) // ideally this should just be synced to trackConversion on the link-- createdAt DateTime @default(now())- updatedAt DateTime @updatedAt-- @@index(linkId)- @@index(projectId)- @@index(userId)-}+}\ No newline at end of filediff --git a/apps/web/prisma/schema/schema.prisma b/apps/web/prisma/schema/schema.prismaindex 631b95cd3c..d580d82004 100644--- a/apps/web/prisma/schema/schema.prisma+++ b/apps/web/prisma/schema/schema.prisma@@ -34,7 +34,7 @@ model User {sessions Session[]projects ProjectUsers[]links Link[]- sharedDashboards SharedDashboard[]+ dashboards Dashboard[]tokens Token[]restrictedTokens RestrictedToken[]oAuthCodes OAuthCode[]diff --git a/apps/web/prisma/schema/workspace.prisma b/apps/web/prisma/schema/workspace.prismaindex f2b2fd3634..2fc8a2954c 100644--- a/apps/web/prisma/schema/workspace.prisma+++ b/apps/web/prisma/schema/workspace.prisma@@ -51,7 +51,7 @@ model Project {installedIntegrations InstalledIntegration[] // Integrations workspace installedwebhooks Webhook[]registeredDomains RegisteredDomain[]- sharedDashboards SharedDashboard[]+ dashboards Dashboard[]utmTemplates UtmTemplate[]@@index(usageLastChecked(sort: Asc))