Registration Error
Hi everyone, could someone help me? I followed the official documentation, but I got a 500 error. I'll attach pictures of everything.



1 Reply
error log: POST /api/auth/sign-up/email 500 in 65ms
SERVER_ERROR: [Error [BetterAuthError]: [# Drizzle Adapter]: The model "user" was not found in the schema object. Please pass the schema directly to the adapter options.] {
cause: undefined
}
my schema: export const user = pgTable("user", {
id: text("id").primaryKey(),
name: text("name").notNull(),
email: text("email").notNull().unique(),
emailVerified: boolean("email_verified").notNull(),
image: text("image"),
createdAt: timestamp("created_at").notNull(),
updatedAt: timestamp("updated_at").notNull(),
});
Solution: database: drizzleAdapter(db, {
provider: "pg",
schema: {
user
account
session
verification
},
}), add schema in the adapter conifg pleas update in the documentation