Skip to content

Commit

Permalink
Remove old domain columns
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Jul 14, 2024
1 parent 5b5ac1b commit cc43660
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 43 deletions.
11 changes: 0 additions & 11 deletions apps/web/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -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 models
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index(projectId)
@@index(clicks(sort: Desc))
@@index(lastClicked)
@@index(lastChecked(sort: Asc))
}

Expand Down
2 changes: 2 additions & 0 deletions apps/web/scripts/bulk-create-domains.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
5 changes: 1 addition & 4 deletions apps/web/scripts/format-links.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// @ts-nocheck

// TODO:
// Fix the script
// @ts-nocheck – old migration script

import { prisma } from "@/lib/prisma";
import "dotenv-flow/config";
Expand Down
5 changes: 1 addition & 4 deletions apps/web/scripts/update-noindex.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// @ts-nocheck

// TODO:
// Fix the script
// @ts-nocheck – old migration script

import { prisma } from "@/lib/prisma";
import { redis } from "@/lib/upstash";
Expand Down
24 changes: 0 additions & 24 deletions packages/utils/src/constants/dub-domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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).",
Expand All @@ -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.).",
Expand All @@ -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.).",
Expand All @@ -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",
Expand All @@ -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,
Expand Down

0 comments on commit cc43660

Please sign in to comment.