Prisma re-generating your schema - if you make changes to your schema so your code intellisense would work
Let's say you're adding a new collection called "Test" and your schema.prisma would look something like this
generator client
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
}
model Post {
id String @id @default(auto()) @map("_id") @db.ObjectId
title String
userId String @db.ObjectId
user User @relation(fields: [userId], references: [id])
}
model User {
id String @id @default(auto()) @map("_id") @db.ObjectId
email String
posts Post[]
}
model Test {
id String @id @default(auto()) @map("_id") @db.ObjectId
email String
}
To ensure these schema are reflected in your code, run
npx prisma generate
Comments