Join Slack
Powered by
Hello ! Is it possible to update the Date field o...
# orm-help
m
Mathie
05/25/2022, 9:50 AM
Hello ! Is it possible to update the Date field of my Table to NOW(), every time I update the row? Without doing it in my code
i
Irek Prucnal
05/25/2022, 10:02 AM
@Mathie
do you mean something like this?
https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#updatedat
m
Mathie
05/25/2022, 10:04 AM
Yeah Thank you Irek
👍 1
n
Nurul
05/25/2022, 10:12 AM
Hey Mathie 👋 Link that Irek mentioned is spot on! Any time you update a column of a record and you have
@updatedAt
attribute, it would automatically update the column having
@updatedAt
attribute with current time.
4
Views
Open in Slack
Previous
Next