created_at/updated_at
Hello there, newbie here. I'm struggling with something fairly basic, does anyone know how can I have a
created_at
and updated_at
working? Thanks!2 Replies
I'm on postgres btw
I use this:
Both values would be initialised to the current date.
To set up
updatedAt
, the recommended method is to just set updatedAt: new Date()
when you are updating a record.