Closed canadaduane closed 5 months ago
An enum field can have a @map attribute that defines an explicit value:
enum
@map
https://www.prisma.io/docs/orm/prisma-schema/data-model/database-mapping#map-enum-names-and-values
For example:
enum GradeLevel { KINDERGARTEN @map("kindergarten") FIRST @map("first") SECOND @map("second") THIRD @map("third") FOURTH @map("fourth") FIFTH @map("fifth") SIXTH @map("sixth") SEVENTH @map("seventh") EIGHTH @map("eighth") NINTH @map("ninth") TENTH @map("tenth") ELEVENTH @map("eleventh") TWELFTH @map("twelfth") THIRTEEN @map("thirteen") POST_SECONDARY @map("post_secondary") OTHER @map("other") }
Could this be included?
@canadaduane I have added parsing rules for attributes to enums and have published v0.12.0 with the new feature. Please check it out and verify that it works for you
Looks great, thank you!
An
enum
field can have a@map
attribute that defines an explicit value:https://www.prisma.io/docs/orm/prisma-schema/data-model/database-mapping#map-enum-names-and-values
For example:
Could this be included?