#How to enable linting of schema files in VS Code?

1 messages · Page 1 of 1 (latest)

fervent rivet
#

According to the docs there should be linting when I forget to add an index for a foreign key:
This doesn't happen for me, I get no warnings. The plugin works (Prisma.prisma), because I get errors and automatic actions when I format my schema, but I don't get warnings at all. What am I doing wrong?

inner compass
#

Sorry, could you link me the docs that say that an index should be added for an FK?

fervent rivet
#

it shouldn't be added

#

i should be warned like in the screenshot 😅

inner compass
#

Right, sorry. What I meant was that I think our docs are wrong and wanted to know where in the docs you saw that.

fervent rivet
#

does this plugin still work?

#

i checked the migrations and prisma doesn't generate the necessary indexes

inner compass
#

Are you using the prisma relation mode and PlanetScale?

fervent rivet
#

I'm using the default relation mode (which is not prisma AFAIK). I'm using a regular Postgresql instance on my local computer

#

@inner compass

inner compass
#

Yeah, those docs are only for the prisma relation mode

fervent rivet
#

so I can only get a warning if I'm not using my own database's contstraint mechanisms?

inner compass
fervent rivet
inner compass
#

I think so? 🙃