prettier-plugin-prisma icon indicating copy to clipboard operation
prettier-plugin-prisma copied to clipboard

Should not modify schema to add new relationships

Open rik-iso opened this issue 1 year ago • 0 comments

Describe the bug

This prettier plugin modifies our schema to add new reverse relationships.

To Reproduce

Table A adds a relationship on table B.

Expected behavior

Nothing.

Experienced behavior

Table B gets a relationship added back to Table A.

Additional context

I get that this is useful in some cases, but a prettier plugin shouldn't be making those decisions for us. Furthermore, the reverse relationship that gets added isn't consistent in terms of casing/style with our other ones.

In our case, we don't want that reverse relationship adding because we don't have indexes on it so it would be an inefficient query.

rik-iso avatar Sep 27 '23 00:09 rik-iso