Prisma and planetscale with nextjs
Answered
Rough harvester ant posted this in #help-forum
Rough harvester antOP
I'm using nextjs. When clicking 'Connect' on my dashboard, under Nodejs it only gives me a connection string using the mysql protocol. I've tried opening prisma studio and it gives me the error
This error also appears when pushing prisma schema to planetsale with
error: Error validating datasource `db`: the URL must start with the protocol `file:`.This error also appears when pushing prisma schema to planetsale with
npx prisma db pushAnswered by Rough harvester ant
Hi sorry I forgot about this problem, I solved it by putting the datasource as prisma (which is what I'm using)
7 Replies
some time ago i saw someone with this problem and he solved it by:
I re-generated the planetscale url and redeployed with github
My guess is you have the wrong provider in your schema.
file: tells me you have the sqlite provider instead of mysql for planetscale.yeah i thought that too, but i think their errors are bad... (maybe including more then they should)
yes it could be more verbose
it could be like... it doesn't work, i through this message
Rough harvester antOP
Hi sorry I forgot about this problem, I solved it by putting the datasource as prisma (which is what I'm using)
Answer