The @updatedAt attribute updates the timestamp when any change is made to a record. I propose adding a new fields parameter, which only updates the timestamp when any of the fields specified are changed.
Prisma issues: prisma/prisma#7602 prisma/prisma#12164
Sample Usage
model User {
name String
nameUpdatedAt DateTime @updatedAt(fields: [name])
}
I will start implementing this feature if and when zenstackhq/zenstack-v3#572 is merged, but these features would pretty much be mutually exclusive.
The
@updatedAtattribute updates the timestamp when any change is made to a record. I propose adding a newfieldsparameter, which only updates the timestamp when any of the fields specified are changed.Prisma issues: prisma/prisma#7602 prisma/prisma#12164
Sample Usage
I will start implementing this feature if and when zenstackhq/zenstack-v3#572 is merged, but these features would pretty much be mutually exclusive.