Issue with filtering on timestamp column

I have a postgres database, using pg-core.

A table has a row defined as:
expirationDate: timestamp("expiration_date", { mode: "date" }).notNull()

I am attempting to write a query to delete records that have an expirationDate in the past with this:
const deletedUserIds: { deletedId: string }[] = await db
  .delete(TokensTable)
  .where(lt(TokensTable.expirationDate, Date.now()))
  .returning({ deletedId: TokensTable.user });


I am getting an error on the lt function, specifically: "No overload matches this call."
Was this page helpful?