Reputation: 6991
I would like to change the name and location of the prisma folder. Currently it called prisma and it sits on the root folder of my nextjs project. I'd like to name it db and have it within the src folder. Is that possible? If so, how?
Upvotes: 7
Views: 8847
Reputation: 6991
The prisma docs explain how to do this: https://www.prisma.io/docs/orm/prisma-schema/overview#prisma-schema-file-location
For my particular situation, I added the following code to package.json
:
"prisma": {
"schema": "src/db/schema.prisma"
},
That changed the location to a folder called db
inside of the src
folder. I tested it out it works exactly as I wanted -- migrations and all.
Upvotes: 18