loop-payments / prisma-lint

A linter for Prisma schema files.
https://www.npmjs.com/package/prisma-lint
MIT License
120 stars 4 forks source link

Add support for GIN index scoping #426

Open xelnagapi opened 1 week ago

xelnagapi commented 1 week ago

I tried adding a GIN index for JsonbPathOps, but this resulted in a parsing error

  @@index([info(ops: JsonbPathOps)], type: Gin)

https://www.prisma.io/docs/orm/prisma-schema/data-model/indexes

This resulted in the following error:

Error: Failed to parse attribute, first value is not a string
    at extractPrimaryFieldNameFromRelationListAttribute ([...]/node_modules/prisma-lint/dist/rules/require-field-index.js:202:11)
maxh commented 1 week ago

For now we could no-op in these scenarios to avoid blocking. Is there a way you can work around it at the moment?