You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: Unique constraint failed on the (not available) on PlanetScale/Vitess #10829
Note: Please read #10829 (comment) before responding to this issue.
Bug description
PlanetScale/Vitess does not provide the column name. But additionally to that not showing, we are also missing the additional fields or constraint string that is present in the error, helping the user to figure out what might be wrong.
How to reproduce
Cause unique constraint error on PlanetScale/Vitess
Expected behavior
More helpful error message.
Prisma information
Environment & setup
OS:
Database:
Node.js version:
Prisma Version
3.7.0
Reacted by Jonah Allibone, yujonglee, ~, david, Vlad Știrbu, Jeremias Jutz, Pål Brattberg, dpnick, Daniel Yeoman, Romelium and 34 more
changed the title [-]Error: Unique constraint failed on the (not available)[/-][+]`Error: Unique constraint failed on the (not available)`[/+]on Dec 22, 2021
Thank you @VivekGupta137 , I was stuck on this for hours. Why can't the error message give more information? Like hint to what column is missing or that there may be an issue with duplicates - rather than a cryptic Unique constraint failed on the (not available)
changed the title [-]`Error: Unique constraint failed on the (not available)`[/-][+]`Error: Unique constraint failed on the (not available)` on PlanetScale/Vitess[/+]on Jun 8, 2023
Facing the same issue, I'm making an error handling for my API using prisma, but planet Scale do not put information on the "meta" of the error, It's impossible to know what column is causing the error, if the error does not be solved, probably I will migrate for other database service
Unfortunately thats not an option for me, my company uses PlanetScale.
The error doesn't occur locally on a standard MySQL server, only popped up in the last week in our dev server (which uses PlanetScale). Only changes to the dev server were a single migration creating a new table, and updated the Prisma NPM version. Although I tried rolling back the prisma version it didn't solve the issue.
Activity
[-]Error: Unique constraint failed on the (not available)[/-][+]`Error: Unique constraint failed on the (not available)`[/+]pantharshit00 commentedon Dec 22, 2021
I can confirm with
planetscale.jonahallibone commentedon Jan 5, 2022
robcornn commentedon Jan 8, 2022
dyeoman2 commentedon Feb 10, 2022
WorkAttackDev commentedon Feb 11, 2022
Saleh-Alibrahim commentedon Feb 19, 2022
dpnick commentedon Mar 11, 2022
25 remaining items
samheyman commentedon Mar 28, 2023
Thank you @VivekGupta137 , I was stuck on this for hours. Why can't the error message give more information? Like hint to what column is missing or that there may be an issue with duplicates - rather than a cryptic
Unique constraint failed on the (not available)KODerFunk commentedon Jun 8, 2023
Jolg42 commentedon Jun 8, 2023
[-]`Error: Unique constraint failed on the (not available)`[/-][+]`Error: Unique constraint failed on the (not available)` on PlanetScale/Vitess[/+]KODerFunk commentedon Jun 8, 2023
janpio commentedon Jun 8, 2023
vimtor commentedon Jun 13, 2023
Facing the same issue here using Planetscale. For me it was creating the same object twice in a deep nested
create.DarlonHenrique commentedon Nov 20, 2023
Facing the same issue, I'm making an error handling for my API using prisma, but planet Scale do not put information on the "meta" of the error, It's impossible to know what column is causing the error, if the error does not be solved, probably I will migrate for other database service
shrikantshet commentedon Jan 15, 2024
Still facing the same issue.
lbartoszcze commentedon Mar 10, 2024
facing this issue too
JacobwBruce commentedon Dec 5, 2024
Did anyone find a solution for this?
lbartoszcze commentedon Dec 5, 2024
yes, migrating off planetscale to supabase
JacobwBruce commentedon Dec 5, 2024
Unfortunately thats not an option for me, my company uses PlanetScale.
The error doesn't occur locally on a standard MySQL server, only popped up in the last week in our dev server (which uses PlanetScale). Only changes to the dev server were a single migration creating a new table, and updated the Prisma NPM version. Although I tried rolling back the prisma version it didn't solve the issue.