Skip to content

Commit

Permalink
chore(core): upgrade to prisma 4
Browse files Browse the repository at this point in the history
  • Loading branch information
tericcabrel committed Jul 4, 2022
1 parent d07cc7a commit 3bd3324
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
"db:seed": "prisma db seed"
},
"dependencies": {
"@prisma/client": "^3.15.2",
"@prisma/client": "^4.0.0",
"cuid": "^2.1.8"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"dotenv": "^16.0.0",
"jest": "^27.5.1",
"prisma": "^3.15.2",
"prisma": "^4.0.0",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/database/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum SnippetVisibility {
model Role {
id String @id @db.VarChar(50)
name RoleName @unique
level Int @db.Int
level Int
description String? @db.VarChar(200)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
Expand All @@ -45,7 +45,7 @@ model User {
email String @unique @db.VarChar(100)
password String? @db.VarChar(100)
username String? @db.VarChar(50)
name String @map("name") @db.VarChar(50)
name String @db.VarChar(50)
timezone String? @db.VarChar(50)
isEnabled Boolean @default(false) @map("is_enabled") @db.TinyInt
pictureUrl String? @map("picture_url") @db.VarChar(255)
Expand All @@ -68,7 +68,7 @@ model Folder {
userId String @map("user_id") @db.VarChar(50)
parentId String? @map("parent_id")
name String @db.VarChar(255)
isFavorite Boolean @default(false) @map("is_favorite") @db.TinyInt
isFavorite Boolean @default(false) @map("is_favorite")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
Expand Down
6 changes: 3 additions & 3 deletions packages/database/prisma/schema.test.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum SnippetVisibility {
model Role {
id String @id @db.VarChar(50)
name RoleName @unique
level Int @db.Int
level Int
description String? @db.VarChar(200)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
Expand All @@ -44,7 +44,7 @@ model User {
email String @unique @db.VarChar(100)
password String? @db.VarChar(100)
username String? @db.VarChar(50)
name String @map("name") @db.VarChar(50)
name String @db.VarChar(50)
timezone String? @db.VarChar(50)
isEnabled Boolean @default(false) @map("is_enabled") @db.TinyInt
pictureUrl String? @map("picture_url") @db.VarChar(255)
Expand All @@ -67,7 +67,7 @@ model Folder {
userId String @map("user_id") @db.VarChar(50)
parentId String? @map("parent_id")
name String @db.VarChar(255)
isFavorite Boolean @default(false) @map("is_favorite") @db.TinyInt
isFavorite Boolean @default(false) @map("is_favorite")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
Expand Down
36 changes: 18 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2132,22 +2132,22 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@prisma/client@^3.15.2":
version "3.15.2"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-3.15.2.tgz#2181398147afc79bfe0d83c03a88dc45b49bd365"
integrity sha512-ErqtwhX12ubPhU4d++30uFY/rPcyvjk+mdifaZO5SeM21zS3t4jQrscy8+6IyB0GIYshl5ldTq6JSBo1d63i8w==
"@prisma/client@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-4.0.0.tgz#ed2f46930a1da0d8ae88d7965485973576b04270"
integrity sha512-g1h2OGoRo7anBVQ9Cw3gsbjwPtvf7i0pkGxKeZICtwkvE5CZXW+xZF4FZdmrViYkKaAShbISL0teNpu9ecpf4g==
dependencies:
"@prisma/engines-version" "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e"
"@prisma/engines-version" "3.16.0-49.da41d2bb3406da22087b849f0e911199ba4fbf11"

"@prisma/engines-version@3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e":
version "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e.tgz#bf5e2373ca68ce7556b967cb4965a7095e93fe53"
integrity sha512-e3k2Vd606efd1ZYy2NQKkT4C/pn31nehyLhVug6To/q8JT8FpiMrDy7zmm3KLF0L98NOQQcutaVtAPhzKhzn9w==
"@prisma/engines-version@3.16.0-49.da41d2bb3406da22087b849f0e911199ba4fbf11":
version "3.16.0-49.da41d2bb3406da22087b849f0e911199ba4fbf11"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-3.16.0-49.da41d2bb3406da22087b849f0e911199ba4fbf11.tgz#4b5efe5eee2feef12910e4627a572cd96ed83236"
integrity sha512-PiZhdD624SrYEjyLboI0X7OugNbxUzDJx9v/6ldTKuqNDVUCmRH/Z00XwDi/dgM4FlqOSO+YiUsSiSKjxxG8cw==

"@prisma/engines@3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e":
version "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e.tgz#f691893df506b93e3cb1ccc15ec6e5ac64e8e570"
integrity sha512-NHlojO1DFTsSi3FtEleL9QWXeSF/UjhCW0fgpi7bumnNZ4wj/eQ+BJJ5n2pgoOliTOGv9nX2qXvmHap7rJMNmg==
"@prisma/engines@3.16.0-49.da41d2bb3406da22087b849f0e911199ba4fbf11":
version "3.16.0-49.da41d2bb3406da22087b849f0e911199ba4fbf11"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-3.16.0-49.da41d2bb3406da22087b849f0e911199ba4fbf11.tgz#82f0018153cffa05d61422f9c0c7b0479b180f75"
integrity sha512-u/rG4lDHALolWBLr3yebZ+N2qImp3SDMcu7bHNJuRDaYvYEXy/MqfNRNEgd9GoPsXL3gofYf0VzJf2AmCG3YVw==

"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
version "1.1.2"
Expand Down Expand Up @@ -8427,12 +8427,12 @@ pretty-format@^28.0.0, pretty-format@^28.1.1:
ansi-styles "^5.0.0"
react-is "^18.0.0"

prisma@^3.15.2:
version "3.15.2"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-3.15.2.tgz#4ebe32fb284da3ac60c49fbc16c75e56ecf32067"
integrity sha512-nMNSMZvtwrvoEQ/mui8L/aiCLZRCj5t6L3yujKpcDhIPk7garp8tL4nMx2+oYsN0FWBacevJhazfXAbV1kfBzA==
prisma@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-4.0.0.tgz#4ddb8fcd4f64d33aff8c198a6986dcce66dc8152"
integrity sha512-Dtsar03XpCBkcEb2ooGWO/WcgblDTLzGhPcustbehwlFXuTMliMDRzXsfygsgYwQoZnAUKRd1rhpvBNEUziOVw==
dependencies:
"@prisma/engines" "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e"
"@prisma/engines" "3.16.0-49.da41d2bb3406da22087b849f0e911199ba4fbf11"

process-nextick-args@~2.0.0:
version "2.0.1"
Expand Down

0 comments on commit 3bd3324

Please sign in to comment.