Firro
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Just have to figure out now why it accesses the wrong model
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
So that your auth.ts is the source of truth
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
But I'd not manually change them but via changing
auth.ts
-> better-auth/cli generate -> prisma generate -> prisma migrate37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
I did that as well, but for me it just worked
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Nah, modifying them is 100% the way to go
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
But not that familiar with Prisma sorry
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Yeah it feels like that, I'd triple check the auth.ts file
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Hmm, well, maybe someone else who is more familiar with Prisma+Better Auth could help then, wish you all the best
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
And then the rest of your other application tables below it
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
In general I'd say you should have a section in your Prisma schema that you just always copy-paste over from the generated better auth schema instead of manually adding the columns
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
And then compare the two to see what you need to change
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Ahh. Maybe try running the better auth generate command and see what it outputs
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Because if so, hmm, tough, don't know why that shouldn't just work then
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
And then you've ran:
npx @better-auth/cli generate
?37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Have you configured it to via: https://www.better-auth.com/docs/concepts/database#custom-table-names
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
If you only wanted to change the name of the tables, it's surprising that an additional column snuck in
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Can you post the extended schema you did? Only the part for the account
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Ok wait, I just realized, account shouldn't have a name
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
That's what I'd check first
37 replies
BABetter Auth
•Created by Logesh on 4/23/2025 in #help
Need help in adding Custom Table Names
Mhmm, are you 100% sure name is not empty here?
37 replies