Help with Error in Schema engine with Planetscale.
I've recently changed to schema folder structure and now can't push a new table to db... ?
When I try and push
npx prisma db push
I get an error "Oops, an unexpected error occurred! Error in Schema engine. Reason: [schema-engine/sql-schema-describer/src/mysql... [more...]"
Prisma generates correctly, types for the new table are generated with no errors, prisma Studio recognises the new table but I cann't push it.
@prisma/client: 6.12
node: v22.11.0
Can anyone help me debug please?15 Replies
You chose to debug with a human. They'll tinker with your query soon. If you get curious meanwhile, hop into
#ask-ai
for a quick spin!OK, update. I've just run
format
, generate
, db push
and it didn't error this time but just gave basic output in the terminal:
But db was not updated.
If i restart my app which uses "npx prisma generate && next dev"
with the prisma config :
The error returns...Hey @Rob!
Can you check if the error goes away if you downgrade to prisma 6.11?
Thanks @Nurul - I have downgraded prisma and prisma/client to 6.11 and run format, generate, push and I do not see the error but the DB is not pushed (as above)
I get:
But the db is not updated.
So the process gets completed without any errors but the new table is not created, right?
Correct
I think I used to see more output from a
db push
?
I just tried a breaking change (making an optional field required) I don't see any warning output for that.This is with PlanetScale, right?
Yes
I am checking this with team internally. Let me get back to you.
Thanks Nurul 🙂
Ok, so it seems that our team became aware of this issue yesterday and are in touch with PlanetScale team to get this resolved.
Was your PlanetScale instance updated to a new version recently?
Check this issue:
https://github.com/prisma/prisma/issues/27734
This is related to Vitess upgrade from version 21 to 22
GitHub
prisma db push
panics on PlanetScale: **called Result::unwrap() o...Bug description Running yarn prisma db push against a PlanetScale (Vitess) development branch crashes the schema engine with: Origin of the problem The very first command I ran was yarn prisma migr...
PlanetScale team is working on fixing this:
https://github.com/prisma/prisma/issues/27734#issuecomment-3114721795
GitHub
prisma db push
panics on PlanetScale: **called Result::unwrap() o...Bug description Running yarn prisma db push against a PlanetScale (Vitess) development branch crashes the schema engine with: Origin of the problem The very first command I ran was yarn prisma migr...
That's a great help - sorry I hadn't seen that issue previously.
My changes can wait until Monday so hopefully we'll see a fix (or revert) before then.
Thanks for your help 🙂
Added Planetscale for others searching out the same issue here.
All good! This is a very recent issue so not many were aware of this issue. This should be fixed hopefully very soon 🙂
Fix seems to be merged recently as well:
https://github.com/vitessio/vitess/pull/18489
So, the issue should be resolved soon.
@Rob You can ask PlanetScale support team to downgrade to Vitess 21, which should unblock you
https://discord.com/channels/937751382725886062/1397683940399255593/1397729972877266954