Here's an interesting one: I have created a migrat...
# prisma-migrate
a
Here's an interesting one: I have created a migration to create a new table. I run the migration locally and everything works as expected (of course 🀦 ). I push everything to prod and run
npx prisma migrate deploy
and it completes the task. Of course i hit the endpoint locally, I get a response. I hit the prod endpoint and get
Error: TypeError: Cannot read property 'findMany' of undefined
Because it's still in testing, I run
npx prisma migrate reset
and clear all the data
The last migration is in there
a
Hey Alex πŸ‘‹ , Did you run
prisma generate
in production?
a
πŸ‘‹ I had previously. Please hold as I try again
done. Same issue 😞 I am not sure what could be going on. I've even blown away the db and run it all again. I can see the migration run successfully
this is the age old, "It works locally"
I'm able to fetch from all the tables except the new one
a
How are you regenerating the client? Where is your app hosted? We have seen some trouble with deployment platforms caching old versions of the client.
a
It's hosted at Render.com
I've not found much documentation/SO posts with regards to Render. I've even `rm`'d the
sqlite.db
file and re-ran the migrations. It's so odd
I'm going to do a
Clear Cache and Re-deploy
on Render and see if that helps
Could take up to 2 minutes to re-mount the disk
a
My assumption based on the error message is that the migration is working, but the new client isn’t getting generated or picked up for some reason. Are you running
prisma generate
in a postinstall or build script?
a
No sir. Manually. I got a new error so I'm reloading the Front end now to see if the Clear Cache was the issue
Welp... 🀦 reploying after clearing the cache was the answer. Thank you for your time
πŸ‘ 1
πŸš€ 1