You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prisma.<Model>CreateInput in v4 is not assignable to Prisma.<Model>CreateInput in v5 because this change
For details, prisma-fabbrica generates enumerable field TypeScript code as the following:
modelFieldTypePatternModel {enumerableIntInt[]}
/* generated type */typeFieldTypePatternModelFactoryDefineInput={enumerableInt?: Prisma.FieldTypePatternModelCreateenumerableIntInput|Prisma.Enumerable<number>;}
The type Prisma.FieldTypePatternModelCreateenumerableIntInput | Prisma.Enumerable<number> can be assigned Prisma.FieldTypePatternModelCreateInput["enumerableInt"] in Primsa client v4, but can not be assigned to the same field in Prisma client v5.
In Prisma v5, Prisma.FieldTypePatternModelCreateInput["enumerableInt"] is defined as Prisma.FieldTypePatternModelCreateenumerableIntInput | Array<number>.
Implementation plan
Change prisma-fabbrica's code generation as the following:
/* before */typeFieldTypePatternModelFactoryDefineInput={enumerableInt?: Prisma.FieldTypePatternModelCreateenumerableIntInput|Prisma.Enumerable<number>;}
/* after */typeFieldTypePatternModelFactoryDefineInput={enumerableInt?: Prisma.FieldTypePatternModelCreateenumerableIntInput|Array<number>;}
And this change should be published as major version up because this change can break codes of users of prisma-fabbrica.
The text was updated successfully, but these errors were encountered:
Problems to solve
Prisma.<Model>CreateInput
in v4 is not assignable toPrisma.<Model>CreateInput
in v5 because this changeFor details, prisma-fabbrica generates enumerable field TypeScript code as the following:
The type
Prisma.FieldTypePatternModelCreateenumerableIntInput | Prisma.Enumerable<number>
can be assignedPrisma.FieldTypePatternModelCreateInput["enumerableInt"]
in Primsa client v4, but can not be assigned to the same field in Prisma client v5.In Prisma v5,
Prisma.FieldTypePatternModelCreateInput["enumerableInt"]
is defined asPrisma.FieldTypePatternModelCreateenumerableIntInput | Array<number>
.Implementation plan
Change prisma-fabbrica's code generation as the following:
And this change should be published as major version up because this change can break codes of users of prisma-fabbrica.
The text was updated successfully, but these errors were encountered: