prisma-schema-transformer icon indicating copy to clipboard operation
prisma-schema-transformer copied to clipboard

@db.<Type> removed

Open eklemen opened this issue 3 years ago • 1 comments

Im new to Prisma so I'm not sure how this affects things, but after transformation the db specific types are not present. Additional info: I'm using Postgres

Expected: addressId String @id @db.Uuid @map("address_id")

Actual: addressId String @id @map("address_id")

eklemen avatar Apr 28 '21 01:04 eklemen

I think native DB type is not even a thing at the time this utility tool was created.

The deserializer is missing handling of the native DB types @db.* in model fields. https://github.com/IBM/prisma-schema-transformer/blob/master/src/deserializer.ts#L161:10

You can read more about how does the transformer work from https://github.com/IBM/prisma-schema-transformer#how-does-it-work

It would be great that someone from the community can help contribute.

michaellzc avatar Apr 28 '21 04:04 michaellzc