onUpdate
updatedAt: timestamp('updated_at', { mode: 'date', precision: 3 })
.defaultNow()
.$onUpdate(() => sql(now() AT TIME ZONE 'UTC'))
.notNull(),
can we return
sql
from $onUpdate? $onUpdate(() => sql(now() AT TIME ZONE 'UTC')) this?1 Reply
i wanted to make sure we are always storing utc value, thats why wanted to return sql.
instead of new Date()