taxonomy icon indicating copy to clipboard operation
taxonomy copied to clipboard

warn The `referentialIntegrity` attribute is deprecated.

Open akashp1712 opened this issue 2 years ago • 1 comments

Getting below warning while deploying to vercel,

warn The `referentialIntegrity` attribute is deprecated. Please use `relationMode` instead. Learn more at https://pris.ly/d/relation-mode

But while using relationMode, it gives deployment error:



Error: Schema validation error - Error (get-config wasm)
--
19:20:32.652 | Error code: P1012
19:20:32.652 | error: Error validating datasource `db`:
19:20:32.652 | This option can only be set if the preview feature is enabled in a generator block.
19:20:32.652 |  
19:20:32.653 | Example:
19:20:32.653 |  
19:20:32.653 | generator client {
19:20:32.653 | provider = "prisma-client-js"
19:20:32.653 | previewFeatures = ["referentialIntegrity"]
19:20:32.653 | }
19:20:32.653 |  
19:20:32.653 | -->  schema.prisma:4
19:20:32.653 | \|
19:20:32.653 | 3 \|   url      = env("DATABASE_URL")
19:20:32.653 | 4 \|   relationMode = "prisma"
19:20:32.653 | 5 \| }
19:20:32.653 | \|


akashp1712 avatar Feb 22 '23 14:02 akashp1712

so how were uyou able to solve it

jia-ayo avatar Apr 29 '23 20:04 jia-ayo

I ended up removing it:

generator client {
  provider        = "prisma-client-js"
}

akashp1712 avatar May 07 '23 14:05 akashp1712

thanks works

jia-ayo avatar May 08 '23 08:05 jia-ayo