Ralf Vogler
02/10/2021, 2:56 PMnow()? Can't use @updatedAt since there's nothing else to update. Currently I'm setting it to new Date() but that comes from the client which might be not in sync with the server's time.Dominic Hadfield
02/10/2021, 3:01 PM@updatedAtRalf Vogler
02/10/2021, 3:01 PMdata: { }.Ralf Vogler
02/10/2021, 3:02 PMRalf Vogler
02/10/2021, 3:02 PMstart DateTime @default(now())
end DateTime?
... create: { } // start = now(), end = null
... updateMany: { data: { end: new Date() }, where: { end: null } } // end should be set to now() as wellRalf Vogler
02/10/2021, 3:07 PMstart DateTime @default(now())
end DateTime? @updatedAt
... create: { end: null } // start = now(), end = null
... updateMany: { data: { }, where: { end: null } } // end is not updated :(Ryan
02/11/2021, 7:08 AMRalf Vogler
02/11/2021, 8:47 AMupdatedAt for an optional date does not seem to update null.
Also, w/o a symbol for now() this will always be a problem if the query is built on a different device.