Using table prefixes in drizzle multi-project schema with NextAuth.

I'm using a setup that allows for schemas of different projects in one database, the default drizzle setup with T3. Using
"@auth/drizzle-adapter": "^1.1.0",
"drizzle-orm": "^0.29.5",
"next": "^14.2.3",
"next-auth": "5.0.0-beta.18",
"postgres": "^3.4.4",
"@auth/drizzle-adapter": "^1.1.0",
"drizzle-orm": "^0.29.5",
"next": "^14.2.3",
"next-auth": "5.0.0-beta.18",
"postgres": "^3.4.4",
See: https://orm.drizzle.team/docs/goodies#multi-project-schema using const pgTable = pgTableCreator((name) => project1_${name}); When I'm attempting to persist to a database now I receive this error: [auth][cause]: error: relation "account" does not exist It seems somewhere the reference to the account table is hard-coded and doesn't read from the schema.ts - would appreciate any help with this!
Drizzle ORM - Goodies
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Solution:
totally my bad, it's covered in https://authjs.dev/getting-started/adapters/drizzle if anyone has this issue in the future. just needed to pass the tables object with the correct assignments.
Auth.js | Drizzle
Authentication for the Web
Jump to solution
1 Reply
Solution
c
c8mo ago
totally my bad, it's covered in https://authjs.dev/getting-started/adapters/drizzle if anyone has this issue in the future. just needed to pass the tables object with the correct assignments.
Auth.js | Drizzle
Authentication for the Web
Want results from more Discord servers?
Add your server