ERROR: User schema updatedAt - Drizzle | Postgres

Helloo!

When i add $onUpdate method to my users schema in drizzle pg, i cant to perform any action and i get the following error:

 updatedAt: timestamp("updated_at")
    .notNull()
    .$onUpdate(() => sql`CURRENT_TIMESTAMP`)  // this line make  conflicts


# SERVER_ERROR:  TypeError: value.toISOString is not a function
    at Array.map (<anonymous>)
    at Array.map (<anonymous>)
    at Array.map (<anonymous>)
 POST /api/auth/admin/set-role 500


help please!
Was this page helpful?