Can't delete records from Prisma Postgres in Studio
I haven't been able to delete data from the new Prisma Postgres within Studio--neither a single register nor with a rawquery using prisma client.
The error I get is:
When I try to set the Replica Identity I get a permission error.
The owner of the tables is: prisma_migration
My user is: prisma_application
I can't change the permissions with that user.
I tried creating the database with prisma migrate dev and with prisma db push and the situation is the same.
I connect to Studio (v0.503.0) with a generated Prisma Client (v5.21.1) using the --no-engine flag within a local Deno (v2.0.4) development.
Thank you so much!
PS. Love the Prisma Postgres btw! Can't wait to see how it develops!
15 Replies
Hi @kimb0x
Thank you for sharing the error message. What happens if you try to delete a single record via Prisma Studio?
Thank you, yes, when I try to delete 1 or more records the error message is the same. I can create new records and edit the fields, though
This happens with my table that has a relationship and uses an autogenerated 3rd (index) table managed by Prisma/Postgres. A simple table model with no relations allows the delete command without issues.
The automatically generated table _TaskToUser is the one stopping the delete command.
That inbetween table is created with this:
Thank you again!
When I try to truncate the User table with the Prisma Client (Deno/TypeScript) I get this error:
And is also the same error if I try to Truncate the _TaskToUser table.
@RaphaelEtim When you are back, can you try to reproduce this issue?
Having the same issue with Prisma Postgres. I even tried to set REPLICA IDENTITY FULL on the affected table but got an error.
I had this issue too, one of my tables didn't have an @id only an @unique and it seems to work after I made the schema change and made it an @id
Not sure if that's the actual issue
I might need to run a test on that, but currently in my schema all involved tables have both @id and @unique definitions
Hi @kimb0x
Can you please share your schema file?
Thank you!
Amazing job, guys! Thank you so much. Prisma v6 fixed everything for me.
@RaphaelEtim @Nurul (Prisma)
:prisma_green:
Prisma Rocks! π
Hey @kimb0x
Thanks for the kind words. This was fixed and you can read more about it here
GitHub
Release 6.0.0 Β· prisma/prisma
Weβre excited to share the Prisma ORM v6 release todayΒ π
As this is a major release, it includes a few breaking changes that may affect your application. Before upgrading, we recommend that you che...
Thanks again! π
Thank you for your patience while we worked on this π