Skip to content

Commit

Permalink
added prisma relationMode
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Jan 28, 2023
1 parent 4ac3832 commit 988a86f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
11 changes: 11 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
relationMode = "prisma"
}

generator client {
Expand Down Expand Up @@ -46,6 +47,7 @@ model Account {
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([provider, providerAccountId])
@@index([userId])
}

model Session {
Expand All @@ -54,6 +56,8 @@ model Session {
userId String
expires DateTime
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@index([userId])
}

model VerificationToken {
Expand Down Expand Up @@ -91,6 +95,7 @@ model ProjectInvite {
createdAt DateTime @default(now())
@@unique([email, projectId])
@@index([projectId])
}

model ProjectUsers {
Expand All @@ -104,6 +109,7 @@ model ProjectUsers {
projectId String
@@unique([userId, projectId])
@@index([projectId])
}

enum EmailType {
Expand All @@ -121,6 +127,9 @@ model SentEmail {
userId String?
project Project? @relation(fields: [projectId], references: [id], onDelete: Cascade)
projectId String?
@@index([userId])
@@index([projectId])
}

model Link {
Expand Down Expand Up @@ -170,4 +179,6 @@ model Link {
@@index([domain, archived, expiresAt, userId, clicks(sort: Desc)])
// TODO: might wanna add indices for utm_source, utm_medium, utm_campaign
@@index([userId])
}
28 changes: 26 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -722,23 +722,40 @@
resolved "https://registry.yarnpkg.com/@planetscale/database/-/database-1.5.0.tgz#073d9ca9841ad62896a6e31f610e89112e6264ef"
integrity sha512-Qwh7Or1W5dB5mZ9EQqDkgvkDKhBBmQe58KIVUy0SGocNtr5fP4JAWtvZ6EdLAV6C6hVpzNlCA2xIg9lKTswm1Q==

"@prisma/client@^4.4.0", "@prisma/client@^4.6.1":
"@prisma/client@^4.4.0":
version "4.6.1"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-4.6.1.tgz#e8e1d347ecbff44158d21b6591bb99650c8503a8"
integrity sha512-M1+NNrMzqaOIxT7PBGcTs3IZo7d1EW/+gVQd4C4gUgWBDGgD9AcIeZnUSidgWClmpMSgVUdnVORjsWWGUameYA==
dependencies:
"@prisma/engines-version" "4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32"

"@prisma/client@^4.6.1":
version "4.9.0"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-4.9.0.tgz#4a4068f3540732ea5723c008d49ed684d20f9340"
integrity sha512-bz6QARw54sWcbyR1lLnF2QHvRW5R/Jxnbbmwh3u+969vUKXtBkXgSgjDA85nji31ZBlf7+FrHDy5x+5ydGyQDg==
dependencies:
"@prisma/engines-version" "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5"

"@prisma/[email protected]":
version "4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32.tgz#90a71bbdfd5172fc674009346a6ad6b84410cc0a"
integrity sha512-HUCmkXAU2jqp2O1RvNtbE+seLGLyJGEABZS/R38rZjSAafAy0WzBuHq+tbZMnD+b5OSCsTVtIPVcuvx1ySxcWQ==

"@prisma/engines-version@4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5":
version "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5.tgz#9d817a5779fc05b107eb02f63d197ad296d60b3c"
integrity sha512-M16aibbxi/FhW7z1sJCX8u+0DriyQYY5AyeTH7plQm9MLnURoiyn3CZBqAyIoQ+Z1pS77usCIibYJWSgleBMBA==

"@prisma/[email protected]":
version "4.6.1"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-4.6.1.tgz#ae31309cc0f600f2da22708697b3be4eb1e46f9e"
integrity sha512-3u2/XxvxB+Q7cMXHnKU0CpBiUK1QWqpgiBv28YDo1zOIJE3FCF8DI2vrp6vuwjGt5h0JGXDSvmSf4D4maVjJdw==

"@prisma/[email protected]":
version "4.9.0"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-4.9.0.tgz#05a1411964e047c1bc43f777c7a1c69f86a2a26c"
integrity sha512-t1pt0Gsp+HcgPJrHFc+d/ZSAaKKWar2G/iakrE07yeKPNavDP3iVKPpfXP22OTCHZUWf7OelwKJxQgKAm5hkgw==

"@radix-ui/[email protected]":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@radix-ui/number/-/number-1.0.0.tgz#4c536161d0de750b3f5d55860fc3de46264f897b"
Expand Down Expand Up @@ -5385,13 +5402,20 @@ pretty-format@^3.8.0:
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385"
integrity sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==

prisma@^4.4.0, prisma@^4.6.1:
prisma@^4.4.0:
version "4.6.1"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-4.6.1.tgz#6c85fb667abed006a6b849c9c1ddd81d3f071b87"
integrity sha512-BR4itMCuzrDV4tn3e2TF+nh1zIX/RVU0isKtKoN28ADeoJ9nYaMhiuRRkFd2TZN8+l/XfYzoRKyHzUFXLQhmBQ==
dependencies:
"@prisma/engines" "4.6.1"

prisma@^4.6.1:
version "4.9.0"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-4.9.0.tgz#295954b2a89cd35a0e6bcf66b2b036dbf80c75ee"
integrity sha512-bS96oZ5oDFXYgoF2l7PJ3Mp1wWWfLOo8B/jAfbA2Pn0Wm5Z/owBHzaMQKS3i1CzVBDWWPVnOohmbJmjvkcHS5w==
dependencies:
"@prisma/engines" "4.9.0"

proc-log@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8"
Expand Down

0 comments on commit 988a86f

Please sign in to comment.