Prisma Adapter Issues
We customise all our tables to be snake_case via mappings (https://www.better-auth.com/docs/concepts/database#custom-tables)
Today we switched from Postgres (Kysely) to Prisma Postgres (Prisma Adapter).
We have noticed several issues:
1. [FIXED IN PR] Incorrect field mapping in
getTables() which I have reported. GitHub Issue
2. I also noticed FK's in our schema are incorrect.
We manually map fields using the recommended approach and we do not use usePlural.
Has anyone else ran into this?
We did not have this issue when using Turso or Postgres via Kysely.GitHub
DB: Incorrect Field Mapping · Issue #4564 · better-auth/better-auth
Is this suited for github? Yes, this is suited for github To Reproduce TLDR: Incorrect mapping in getTables() better-auth/packages/better-auth/src/db/get-tables.ts Line 228 in 5b78469 options.accou...
Database | Better Auth
Learn how to use a database with Better Auth.
3 Replies
I couldn't identify the cause of the second issue. It does not appear to be in the Prisma Adapter and the issue is not present in Kysely so I presume it's in Prisma.
We decided to stick with a Kysely compatible DB and not use Prisma Postgres in the end.
is this now fixed or still an issue?
I saw the PR and the issue are closed
Sorry for the delay @bekacru . Yes this can be closed. Thank you 🙏