How to create new user using drizzle to better-auth users schema

hey, im using tRPC, drizzle and better auth to handle my authentication ,

i want admin to be able to add new users to the system
export async function getAllUsers() {
  return await db.select().from(user);
}


// Add a new user

//there is an error here !!
export async function addUser(name: string, email: string) {
  return await db.insert(user).values({ name, email, emailVerified: false });
}


but im facing this error in the screenshot, im not sure if this is the right way to do it
Screenshot_2025-02-13_at_12.27.01_AM.png
Was this page helpful?