I have this Prisma schema with a many to many relation between Authors and Posts:
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = ["native"]
}
model Author {
id String @id
posts Post[] @relation(name: "AuthorPostRelation")
}
model Post {
id String @id
authors Author[] @relation(name: "AuthorPostRelation")
}
Prisma (version 3.11.0) generates a table for the implicit relation with field A referencing Authors id and with field B referencing Post's id.
Is there a way to specify custom names for the relation table? E.g. author instead of A and post instead of B?
EDIT: I am aware that specifying custom field names is possible with explicit relation tables, but I'm specifically interested in implicit relation tables.