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
Md Jahidul Islam milon
i wanted to make sure we are always storing utc value, thats why wanted to return sql. instead of new Date()
Want results from more Discord servers?
Add your server