Hi, could anyone please help understanding how to ...
# orm-help
l
Hi, could anyone please help understanding how to implement data migrations with Prisma. For example, if we had enum field and refactored it into set of boolean fields, what is the Prisma-way to set booleans based on enum?
l
I'm not sure what you're asking. Booleans are a core GraphQL primitive.
l
I'm asking if I need to update existing data after scheme update, what is a way to do it. Ie I have enum of 'Auto' and 'Manual' and I've added two boolean fields 'auto' and 'manual' and now need to set one or another to true on existing records according to enum value. In sequelize I'm writing data migration, is it the same for Prisma?
l
Copy code
enum TransmissionType {
   Auto
  Manual
}
then...
Copy code
type Whatever {
   isAuto: Boolean
   isManual: Boolean
}
and then it does need to be migrated..
Copy code
prisma deploy