Matt Young
04/14/2022, 12:24 AMVladi Stevanovic
Vladi Stevanovic
Vladi Stevanovic
SO 2:28 AM
Do you mean you want to change the field name of enum? (edited)
Matt Young 2:29 AM
I have a field that is defined in mysql as enum('401k','403b','Roth_401k','Roth_403b','SIMPLE_401k','SIMPLE_IRA',)
and for some reason, the generated enum becomes : k @map("401k")
I would like to control the "k"part
for some reason the default is to drop the numeric portion
what I would like to do is have the enum key (not @map... part) prefixed with a standard custom prefix when the mapped value is invalid as a type name
something like X_401k @map("401k")
is there a way to control the type name?
SO 2:34 AM
Sorry I'm not familiar with MySQL
Hope somebody help you out.
Matt Young 2:36 AM
this is not a mysql thing, this is how do I control the npx prisma generate command to have some influence over how enums are generated?
sorry npx prisma db pull
not generate
this is the pull command
it generates weird enum names and I am trying to figure out how to control them better
Nurul
04/14/2022, 12:03 PM