Problem
I would like to be able track the update times of specific fields automatically, for example name_updated_at instead of just a blanket updated_at.
Suggested solution
I suggest offering the ability to pass a field name as an argument to the @updatedAt tag. For example:
model User {
name String
nameUpdatedAt DateTime @updatedAt(name)
}
Alternatives
Or if you want to make it a little more dynamic, then a list of field names like this
model User {
name String
nameUpdatedAt DateTime @updatedAt(fields: [name])
}
Additional context
field_updated_at is a fairly common sql pattern used extensively in rails. It makes it easier to track more sensitive changes, especially those that require authorization.
Problem
I would like to be able track the update times of specific fields automatically, for example
name_updated_atinstead of just a blanketupdated_at.Suggested solution
I suggest offering the ability to pass a field name as an argument to the
@updatedAttag. For example:Alternatives
Or if you want to make it a little more dynamic, then a list of field names like this
Additional context
field_updated_atis a fairly common sql pattern used extensively in rails. It makes it easier to track more sensitive changes, especially those that require authorization.