Steven Kuck
07/22/2022, 4:34 PMNurul
07/25/2022, 3:48 PMSteven Kuck
07/25/2022, 6:35 PM(CASE WHEN daterevised = '0000-00-00' THEN NULL ELSE daterevised END) AS daterevised
which works as a workaround, but it is unsatisfactory overall.
Primarily, we can't do this is a Prisma object, only in a custom query. The point of moving to Prisma was to avoid doing custom queries.
We also have a large, legacy system that we're progressively rewriting from a monolith to a GraphQL back end supporting a Vue front end. The code that hasn't been migrated yet has to keep working.
An analysis to find all the 0000-00-00 will be necessary regardless, but migrating the data away from that format might cause issues in the legacy system that we'd all rather not risk changing.Steven Kuck
07/25/2022, 6:37 PMSteven Kuck
07/25/2022, 6:39 PMSteven Kuck
07/25/2022, 6:42 PM`datestarted` date NOT NULL DEFAULT '0000-00-00',
Yes, I'd like to change that, but again, we start to get into how that would impact the still-running legacy system which will necessarily coexist with our new system for some time.Steven Kuck
07/25/2022, 6:49 PMdate DateTime ✔️ @db.Date
is a little bit ... wrong.
https://www.prisma.io/docs/concepts/database-connectors/mysql#native-type-mappingsNurul
07/26/2022, 2:15 PMSteven Kuck
07/26/2022, 6:49 PM