why doesn't `onConflictDoUpdate` allow strings as targets?

Can't do this...
await db
      .insert(schema.users)
      .values({
        role,
        username,
      })
      .onConflictDoUpdate({
        target: "users_lower_username_uidx",
        set: {
          role,
          updatedAt: sql`now()`,
        },
      })
Was this page helpful?