In a NuxtJS project, when you change the location of the schema.prisma in the package.json and you do a npm run dev at the start of the process it says that the schema is not found in the custom location so it recreates it in the default location (screenshot 1). However at the end of the process it says that it successfully loaded the schema of the custom location (screenshot 2).
How to reproduce
In a NuxtJS project :
Initialize Prisma in Nuxt projects with npm install @prisma/nuxt
Add the module @prisma/nuxt to the modules in your nuxt.config.ts file
Create the folder './server/prisma' and place your prisma schema inside
In your package.json file add the following content
Use the schema.prisma at the custom location to create the database.
Prisma information
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
username String
password String
}
model Option {
id Int @id @default(autoincrement())
name String
shortDescription String?
longDescription String?
price Float
workTime Int
isAmountVariable Boolean
optionGroup OptionGroup @relation(fields: [optionGroupId], references: [id])
optionGroupId Int
bundles OptionOnBundle[]
}
model OptionGroup {
id Int @id @default(autoincrement())
name String
description String?
options Option[]
}
model Bundle {
id Int @id @default(autoincrement())
name String
price Float
includedOptions OptionOnBundle[]
}
model OptionOnBundle {
option Option @relation(fields: [optionId], references: [id])
optionId Int
bundle Bundle @relation(fields: [bundleId], references: [id])
bundleId Int
quantity Int
@@id([optionId, bundleId])
}
Bug description
In a NuxtJS project, when you change the location of the schema.prisma in the package.json and you do a
npm run dev
at the start of the process it says that the schema is not found in the custom location so it recreates it in the default location (screenshot 1). However at the end of the process it says that it successfully loaded the schema of the custom location (screenshot 2).How to reproduce
In a NuxtJS project :
npm install @prisma/nuxt
@prisma/nuxt
to the modules in yournuxt.config.ts
filenpm run dev
Expected behavior
Use the schema.prisma at the custom location to create the database.
Prisma information
Environment & setup
Prisma Version