Skip to content

Commit 2f98a1c

Browse files
authored
bump: Update Prisma to v5.15.1 (#38)
1 parent 8b8935e commit 2f98a1c

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

src/configs/prisma.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { generateModuleHTMLComponent, generateModuleHTMLSnippet } from '../generators/generateModuleComponents'
22
import type { ModuleConfig } from '../types'
33

4-
const prismaFile = `// This is your Prisma schema file,
4+
const prismaRootSchema = `// This is your Prisma schema file,
55
// learn more about it in the docs: https://pris.ly/d/prisma-schema
66
77
generator client {
88
provider = "prisma-client-js"
9+
previewFeatures = ["prismaSchemaFolder"]
910
}
1011
1112
datasource db {
@@ -15,8 +16,9 @@ datasource db {
1516
// This value is read from the .env file.
1617
url = env("DATABASE_URL")
1718
}
19+
`
1820

19-
model Example {
21+
const prismaExampleSchema = `model Example {
2022
id String @id @default(uuid())
2123
details String
2224
}
@@ -108,12 +110,12 @@ const prisma: ModuleConfig = {
108110
dependencies: [
109111
{
110112
name: 'prisma',
111-
version: '^5.11.0',
113+
version: '^5.15.1',
112114
isDev: true
113115
},
114116
{
115117
name: '@prisma/client',
116-
version: '^5.11.0',
118+
version: '^5.15.1',
117119
isDev: false
118120
}
119121
],
@@ -122,8 +124,11 @@ const prisma: ModuleConfig = {
122124
path: '.env',
123125
content: prismaEnvFile
124126
}, {
125-
path: 'prisma/schema.prisma',
126-
content: prismaFile
127+
path: 'prisma/schema/schema.prisma',
128+
content: prismaRootSchema
129+
}, {
130+
path: 'prisma/schema/example.prisma',
131+
content: prismaExampleSchema
127132
}, {
128133
path: 'server/api/examples.get.ts',
129134
content: prismaExampleEndpoint

0 commit comments

Comments
 (0)