Better-auth cannot be set up using pg Pool and postgres
It seems somewhere in the code there's hardcoded user relation when trying to set up:
database: new Pool({
connectionString: process.env.DATABASE_URL,
}),
tables: {
user: "users",
account: "account",
session: "session",
verification: "verification"
},
re-mapping has no effect, you still get an error:
When you use the npx @better-auth/cli generate command, it generates a migration file with "user" table and "user" relations but you cannot create a user table in postgres, it's reserved word. But when trying to log in, it still looks for the user table, dismissing the remapping to "users" table in auth.ts
user: {
modelName: "users",
this gives me error:
0 Replies