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.

small updates

Steven Tey75fb915f9be4
diff --git a/apps/web/prisma/schema.prisma b/apps/web/prisma/schema.prisma
index 9bb76fd438..0384b84544 100644
--- a/apps/web/prisma/schema.prisma
+++ b/apps/web/prisma/schema.prisma
@@ -299,6 +299,7 @@ model Link {
@@index(trackConversion)
@@index(proxy)
@@index(password)
+ @@index(archived)
@@index(createdAt(sort: Desc))
@@index(clicks(sort: Desc))
@@index(lastClicked)
diff --git a/apps/web/scripts/bulk-archive-links.ts b/apps/web/scripts/bulk-archive-links.ts
new file mode 100644
index 0000000000..73bce34bc9
--- /dev/null
+++ b/apps/web/scripts/bulk-archive-links.ts
@@ -0,0 +1,18 @@
+import { prisma } from "@/lib/prisma";
+import "dotenv-flow/config";
+
+const domain = "song.fyi";
+
+async function main() {
+ const links = await prisma.link.updateMany({
+ where: {
+ domain,
+ },
+ data: {
+ archived: true,
+ },
+ });
+ console.log(links);
+}
+
+main();