Type safety on .set() method?

Hey folks - I was wondering if there is a way to get type safety when updating a row using the .set method? In the example below, updated_at is the table name, not the property name
updatedAt
. This code runs with no errors, but of course never updates the updated at because it doesn't exist!

const data = await db
    .update(verifications)
    .set({
      status: 'inactive',
      updated_at: sql`NOW()`,
    })
    .where(and(eq(sql`${persons.id}::text`, personId)))
    .returning();


Any tips for getting this to be type-safe ?
Was this page helpful?