generated from 47ng/typescript-library-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Starting with Prisma v6.16.0, Prisma appears to have removed its Rust dependency.
Reference: https://github.com/prisma/prisma/releases/tag/6.16.0
After upgrading, the shape of dmmf returned by the new client seems to have changed. As a result:
- Zod validation fails because
isList,isUnique, andisIdare no longer present on fields. documentationalso appears to be missing or no longer accessible viadmmf.
I patched the package to avoid the Zod errors, but I still cannot load documentation. Because of this, field encryption no longer works.
This problem occurs when using prisma-client-js (not prisma-client). prisma-client recommends using @prisma/internals as a workaround, but including @prisma/internals pulls a WASM file into the package and that causes errors in some web frameworks (bundling/runtime issues).
Steps to reproduce
- Upgrade Prisma to
6.16.0(or later). - Generate the client and inspect
dmmffromprisma-client-js. - Attempt to read
field.documentation(or run code that expectsisList,isUnique,isId). - Observe Zod validation / field-encryption code failing and
documentationbeing unavailable.
Actual behavior
dmmfno longer containsisList,isUnique, orisIdfor fields.documentationis not accessible viadmmf.- Workarounds that import
@prisma/internalsintroduce WASM which breaks bundling/runtime in some web frameworks. - Field encryption fails because it cannot determine which fields have documentation/metadata.
Workarounds tried
- Rewrote the package to bypass the missing
isList/isUnique/isIdchecks — still cannot accessdocumentation. - Using
@prisma/internals(suggested byprisma-client) — this causes errors in some web frameworks due to the WASM file being included.
Example
dmmf
{
"datamodel":{
"models":[
{
"name":"User",
"fields":[
{
"name":"id",
"kind":"scalar",
"type":"String"
},
{
"name":"name",
"kind":"scalar",
"type":"String"
},
{
"name":"email",
"kind":"scalar",
"type":"String"
},
{
"name":"emailVerified",
"kind":"scalar",
"type":"Boolean"
},
{
"name":"image",
"kind":"scalar",
"type":"String"
},
{
"name":"role",
"kind":"scalar",
"type":"String"
},
{
"name":"banned",
"kind":"scalar",
"type":"Boolean"
},
{
"name":"banReason",
"kind":"scalar",
"type":"String"
},
{
"name":"banExpires",
"kind":"scalar",
"type":"DateTime"
},
{
"name":"stripeCustomerId",
"kind":"scalar",
"type":"String"
},
{
"name":"chatwootSourceId",
"kind":"scalar",
"type":"String"
},
{
"name":"createdAt",
"kind":"scalar",
"type":"DateTime"
},
{
"name":"updatedAt",
"kind":"scalar",
"type":"DateTime"
}
]
}
]
}
}schema.prisma
model User {
id String @id
name String
email String @unique
emailVerified Boolean
image String?
role String?
banned Boolean?
banReason String?
banExpires DateTime?
stripeCustomerId String?
chatwootSourceId String?
createdAt DateTime
updatedAt DateTime
}Metadata
Metadata
Assignees
Labels
No labels