new optional field failing
introduced a new column into one of my models
model MyModel {
...
myKey String? @default(uuid())
}
then ran npx prisma migrate dev
then deploy
on my newly spun up pg docker container successfully, and finally prisma generate
to regenerate the client.
however, upon attempting input a value when create a new row entry, I'm met with
createOneRequest.data.myKey: Field does not exist in enclosing type.
any idea what I might be missing?2 Replies
Is
npx prisma generate
a part of your build script?
I assue you go this error on your deployed app.I've tried testing the migration locally, where I first spin up an empty DB, run the migration using npx prisma migrate deploy, then generate the clients for all touching services using npx prisma generate / prisma generate after assuring the schema files are identical and up to date
any idea what else I could be missing?
appreciate the response @Nurul (Prisma)
@Nurul is there a way to verify that my client is being generated correctly?
resolved, turns out I was generating the prisma client in the wrong python environment