Problem
Prisma 1 IDs are introspected as Strings without a default/@default.
Suggested solution
Introspection can be improved following this logic:
- Is it a
Prisma1 or Prisma11 classified database schema?
- Is there a primary key column of type
char(25) or char(36)?
- If yes, apply the following default:
char(25) -> @default(cuid())
char(36) -> @default(uuid())
Additional context
Problem
Prisma 1 IDs are introspected as Strings without a default/
@default.Suggested solution
Introspection can be improved following this logic:
Prisma1orPrisma11classified database schema?char(25)orchar(36)?char(25)->@default(cuid())char(36)->@default(uuid())Additional context
cuid()anduuid()) #2534