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.

Remove old tables & columns

Steven Tey50dea3f29937
diff --git a/apps/web/prisma/schema/oauth.prisma b/apps/web/prisma/schema/oauth.prisma
index defea93c19..6ff4d1be04 100644
--- a/apps/web/prisma/schema/oauth.prisma
+++ b/apps/web/prisma/schema/oauth.prisma
@@ -1,23 +1,6 @@
model OAuthApp {
- // To be removed
- name String?
- slug String? @unique
- description String?
- readme String? @db.LongText
- developer String?
- website String?
- logo String?
- screenshots Json?
- userId String?
- projectId String?
- verified Boolean? @default(false)
- createdAt DateTime? @default(now())
- updatedAt DateTime? @updatedAt
- user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
- project Project? @relation(fields: [projectId], references: [id], onDelete: Cascade)
-
id String @id @default(cuid())
- integrationId String? @unique // Remove the optional after completing the migration
+ integrationId String @unique
clientId String @unique
hashedClientSecret String
partialClientSecret String
@@ -25,12 +8,7 @@ model OAuthApp {
pkce Boolean @default(false)
oAuthCodes OAuthCode[]
- // authorizedApps OAuthAuthorizedApp[]
integration Integration? @relation(fields: [integrationId], references: [id], onDelete: Cascade)
-
- @@index(projectId)
- @@index([userId])
- @@index([integrationId])
}
model OAuthCode {
@@ -64,27 +42,8 @@ model OAuthRefreshToken {
createdAt DateTime @default(now())
accessToken RestrictedToken @relation(fields: [accessTokenId], references: [id], onDelete: Cascade)
- // authorizedApp OAuthAuthorizedApp @relation(fields: [installationId], references: [id], onDelete: Cascade)
installedIntegration InstalledIntegration @relation(fields: [installationId], references: [id], onDelete: Cascade)
@@index([installationId])
@@index([accessTokenId])
-}
-
-model OAuthAuthorizedApp {
- id String @id @default(cuid())
- clientId String
- projectId String // workspace that user granted access to
- userId String // user who granted access
- createdAt DateTime @default(now())
-
- // oAuthApp OAuthApp @relation(fields: [clientId], references: [clientId], onDelete: Cascade)
- // user User @relation(fields: [userId], references: [id], onDelete: Cascade)
- // project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
- // accessTokens RestrictedToken[]
- // refreshTokens OAuthRefreshToken[]
-
- @@unique([userId, projectId, clientId])
- @@index([clientId])
- @@index([projectId])
-}
+}
\ No newline at end of file