Problem
The database type annotations in the Prisma schema, like @db.Uuid, are not being included in the DMMF that is passed to the generators. However, as of the 5.23.0 timeframe, this information is available from the Prisma CLI. It's quite useful for certain custom generators.
Suggested solution
Add this line in class Field in generator/models.py:
native_type: Optional[Tuple[str, List[str]]] = FieldInfo(alias='nativeType', default=None)
Additional context
This does require setting PRISMA_VERSION to 6.0.0 or later to get the native type information, but does not cause problems with the default version of 5.17.0. The native_type field is simply absent. Using 6.0.0 for custom generators appears to cause no issues.