Change unique key in auth table

Is it possible to change the validation check that's done when a new user is created? For example, if I wanted a composite key to identify individual users like this:

export const userTable = pgTable(
  "user",
  {
    tenantId: text("tenant_id").notNull(), // Add this line
    id: text("id").primaryKey(),
    name: text("name").notNull(),
    email: text("email").notNull(),
    emailVerified: boolean("email_verified").notNull().default(false),
    image: text("image"),
    createdAt: timestamp("created_at").notNull().defaultNow(),
    updatedAt: timestamp("updated_at").notNull().defaultNow(),
    verifiedAt: timestamp("verified_at"),
  },
  (t) => [
    {
      unq: unique().on(t.tenantId, t.email),
    },
  ]
);


Right now, it doesn't work, if I try to sign up a user, I get this error:
INFO [Better Auth]: Sign-up attempt for existing email: <email_address>
Was this page helpful?