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!
12 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!