Error when updating Record

I just set up prisma postgres and when I try to update a relationship I get the following error. PostgresError { code: "55000", message: "cannot delete from table \"_LocationToLocationType\" because it does not have a replica identity and publishes deletes", severity: "ERROR", detail: None, column: None, hint: Some("To enable deleting from the table, set REPLICA IDENTITY using ALTER TABLE.") how to fix this using prisms ORM?
8 Replies
RaphaelEtim
RaphaelEtim7d ago
Hi @davidpink This is a known issue and we are working to provide a fix. I'll provide updates once the fix is rolled out.
davidpink
davidpinkOP7d ago
great, thank you. Keep me posted
RaphaelEtim
RaphaelEtim6d ago
Hi @davidpink Can you please share the schema file and the migration file as well?
davidpink
davidpinkOP6d ago
model LocationType { id String @id @default(cuid()) name String @db.VarChar(255) slug String @unique i18nextKey String icon LocationTypeShort createdAt DateTime @default(now()) locations Location[] } model Location { id String @id @default(cuid()) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt slug String @unique name String @db.VarChar(255) ownerId String owner User @relation(fields: [ownerId], references: [id], onDelete: Restrict) isVerified Boolean @default(false) verifiedAt DateTime? verifiedPlaceId String? @db.VarChar(255) onboardingCompleted Boolean @default(false) locationTypes LocationType[] @@index([slug]) } there’s no migration file. I tried to update the location types with locationTypes: locationTypes ? { set: [], connect: locationTypes?.map((locationType) => ({ id: locationType, })), } : undefined,
RaphaelEtim
RaphaelEtim6d ago
What does the model for LocationTypeShort look like?
davidpink
davidpinkOP6d ago
enum LocationTypeShort { studio shop retreat school }
RaphaelEtim
RaphaelEtim6d ago
Thank you, I've shared it with the team for investigation.
Want results from more Discord servers?
Add your server