The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Remove old domain columns
Steven Teycc436603518c
diff --git a/apps/web/prisma/schema.prisma b/apps/web/prisma/schema.prismaindex 4caada06c2..8ef96fa420 100644--- a/apps/web/prisma/schema.prisma+++ b/apps/web/prisma/schema.prisma@@ -214,22 +214,11 @@ model Domain {project Project? @relation(fields: [projectId], references: [id], onDelete: Cascade)projectId String?- // TODO: Remove these columns after merging #977- target String?- type String @default("redirect")- clicks Int @default(0)- lastClicked DateTime? // when the link was last clicked- publicStats Boolean @default(false)- description String?- noindex Boolean @default(false)-// these attributes will exist on both Link and Domain modelscreatedAt DateTime @default(now())updatedAt DateTime @updatedAt@@index(projectId)- @@index(clicks(sort: Desc))- @@index(lastClicked)@@index(lastChecked(sort: Asc))}diff --git a/apps/web/scripts/bulk-create-domains.ts b/apps/web/scripts/bulk-create-domains.tsindex d3ad32ffbf..7d80a977a6 100644--- a/apps/web/scripts/bulk-create-domains.ts+++ b/apps/web/scripts/bulk-create-domains.ts@@ -1,3 +1,5 @@+// @ts-nocheck – old migration script+import { addDomainToVercel } from "@/lib/api/domains";import { createLink } from "@/lib/api/links";import { prisma } from "@/lib/prisma";diff --git a/apps/web/scripts/format-links.ts b/apps/web/scripts/format-links.tsindex 18407cf573..eeebcbb9e1 100644--- a/apps/web/scripts/format-links.ts+++ b/apps/web/scripts/format-links.ts@@ -1,7 +1,4 @@-// @ts-nocheck--// TODO:-// Fix the script+// @ts-nocheck – old migration scriptimport { prisma } from "@/lib/prisma";import "dotenv-flow/config";diff --git a/apps/web/scripts/update-noindex.ts b/apps/web/scripts/update-noindex.tsindex fe4812c2a2..5ea5846e4e 100644--- a/apps/web/scripts/update-noindex.ts+++ b/apps/web/scripts/update-noindex.ts@@ -1,7 +1,4 @@-// @ts-nocheck--// TODO:-// Fix the script+// @ts-nocheck – old migration scriptimport { prisma } from "@/lib/prisma";import { redis } from "@/lib/upstash";diff --git a/packages/utils/src/constants/dub-domains.ts b/packages/utils/src/constants/dub-domains.tsindex bf88bcf238..51d060a5a9 100644--- a/packages/utils/src/constants/dub-domains.ts+++ b/packages/utils/src/constants/dub-domains.ts@@ -7,11 +7,7 @@ export const DUB_DOMAINS = [verified: true,primary: true,archived: false,- publicStats: false,- target: `https://${process.env.NEXT_PUBLIC_APP_DOMAIN}`,- type: "redirect",placeholder: "https://dub.co/help/article/what-is-dub",- clicks: 0,allowedHostnames: [],description: "The default domain for all new accounts.",projectId: DUB_WORKSPACE_ID,@@ -24,11 +20,7 @@ export const DUB_DOMAINS = [verified: true,primary: false,archived: false,- publicStats: false,- target: "https://dub.co/tools/chatgpt-link-shortener",- type: "redirect",placeholder: "https://chat.openai.com/g/g-UGjKKONEe-domainsgpt",- clicks: 0,allowedHostnames: ["chat.openai.com", "chatgpt.com"],description:"Branded domain for ChatGPT links (convos, custom GPTs).",@@ -40,11 +32,7 @@ export const DUB_DOMAINS = [verified: true,primary: false,archived: false,- publicStats: false,- target: "https://dub.co/tools/spotify-link-shortener",- type: "redirect",placeholder: "https://open.spotify.com/album/1SCyi9a5pOasikidToUY5y",- clicks: 0,allowedHostnames: ["open.spotify.com"],description:"Branded domain for Spotify links (songs, playlists, etc.).",@@ -56,11 +44,7 @@ export const DUB_DOMAINS = [verified: true,primary: false,archived: false,- publicStats: false,- target: "https://dub.co/tools/github-link-shortener",- type: "redirect",placeholder: "https://github.com/dubinc/dub",- clicks: 0,allowedHostnames: ["github.com", "gist.github.com"],description:"Branded domain for GitHub links (repositories, gists, etc.).",@@ -72,11 +56,7 @@ export const DUB_DOMAINS = [verified: true,primary: false,archived: false,- publicStats: false,- target: "https://dub.co/tools/amazon-link-shortener",- type: "redirect",placeholder: "https://www.amazon.com/dp/B0BW4SWNC8",- clicks: 0,allowedHostnames: ["amazon.com","amazon.co.uk",@@ -94,11 +74,7 @@ export const DUB_DOMAINS = [verified: true,primary: false,archived: true,- publicStats: true,- target: "https://dub.co/tools/url-lengthener",- type: "redirect",placeholder: "https://d.to/long",- clicks: 0,description:"Branded domain for lengthening links instead of shortening them.",projectId: DUB_WORKSPACE_ID,