The zones JSON field on the MMap table can be enormous, shouldn't be included in DB queries for/including MMap unless explicitly requested. This is quite annoying - we constantly do joins on other tables including MMap, plus Prisma's MMapSelect type of really ugly, needs booleans for every field you want to include.
Few methods I considered:
Use an explicit Prisma.MMapSelect all over the place, probably include some kind of integration with the expandToIncludes function.
Split out to a MapZones table, 1-1 w/ MMap, using mapID as primary key. Simplifies code quite a bit, but an extra DB table.
Some Prisma Client Extension crap.
(2) is Prisma-agnostic but I'm not a fan of the extra table, so probably going with (1). Have a stash starting on this (started on this just now but realised isn't really necessary for ongoing PR) will pick it up in the future.
The
zones
JSON field on theMMap
table can be enormous, shouldn't be included in DB queries for/including MMap unless explicitly requested. This is quite annoying - we constantly do joins on other tables including MMap, plus Prisma'sMMapSelect
type of really ugly, needs booleans for every field you want to include.Few methods I considered:
Prisma.MMapSelect
all over the place, probably include some kind of integration with theexpandToIncludes
function.MapZones
table, 1-1 w/MMap
, using mapID as primary key. Simplifies code quite a bit, but an extra DB table.(2) is Prisma-agnostic but I'm not a fan of the extra table, so probably going with (1). Have a stash starting on this (started on this just now but realised isn't really necessary for ongoing PR) will pick it up in the future.