I would like to change the name and location of th...
# orm-help
m
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? Thanks 🙂
👍 1
j
you can configure custom schema location with
--schema
flag or inside
package.json
file. See the docs https://www.prisma.io/docs/concepts/components/prisma-schema#prisma-schema-file-location
But I'm not sure what will happen when you use migrations, if they respect custom schema path. By default prisma migrations use
prisma
folder to store migration files next to prisma schema.
r
I don’t think the folder name can be changed. You need to keep it as
prisma
.
m
@Jakub Hrášek Thanks, that did it. The solution I used was to add the following code to `package.json`:
Copy code
"prisma": {
    "schema": "src/db/schema.prisma"
  },
That changed the location to a folder called
db
inside of the
src
folder. I tested it out and migrations worked just fine. Again, thanks 🙂
👍 1