DEV Community

Discussion on: 🔑 Passwordless Authentication with Next.js, Prisma, and next-auth

Collapse
 
garytube profile image
Gary

how would I add new columns to the user model? the offical documentation is not very helpfule.

i want to extend the users schema with user roles for authz

Collapse
 
thebiglabasky profile image
Hervé Labas

Hi Gary,
While it's still experimental, and will be updated in the coming weeks, you can use Prisma migrate to do that.
Update your schema with the columns you need, run migrate (or db push if you don't need to keep and share the history of your schema migrations)
The docs about that are here: prisma.io/docs/reference/tools-and...
Hope it helps!