Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
18 replies
Bennett

Custom field name or rename field in model for NextAuth.js (Prisma adapter)

Hey!

I'm not a fan of fields named id, but rather like to have speaking names like userId or postId, which makes the code easier to read imo.

I'm using the Prisma adapter and added all needed models to my schema. In the User model, I would like to use a field name userId instead of id. Is this possible?
Was this page helpful?