I am getting this error in Prisma Migrations. I know it's experimental but I need the migrations table in the database.
My Schema is as follows
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
// a user can be an admin or a borrower or lender
enum Role {
Lender
Borrower
Admin
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String
role Role
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
First I ran npx prisma migrate save --experimental
Then npx prisma migrate up --experimental
The error I am getting is this.
Error: P1014
The underlying table for model _migration
does not exist.
Also, the migrations table was in the database after I call npx prisma migrate save --experimental But after I run npx prisma migrate up --experimental , It's showing me this error.