At the end of this tutorial, you’ll have your database up and running
dev.db
file inside apps/web/prisma
folder.
User
model is for retrieved information from authentication provider (name, email, image)Account
model is for information about accounts associated with a User
. A single User
can have multiple Account
, but each Account
can only have one User
.Session
model is used for database sessions and it can store arbitrary data for an active user session. A single User
can have multiple Session
, each Session can only have one User
.VerificationToken
model is used to temporary tokens (used for magic-link login).Project
model is for information about projects associated with a User
. A single User
can have multiple Project
, and a single Project
can have multiple User
.ProjectUser
model is for information about the relation between an User
and a Project
.ProjectInvite
model is for information about the invites created for a Project
. A single Project
can have multiple ProjectInvite
, but each ProjectInvite
can only have one Project
.schema.prisma
file and runs the following command:
.sql
migration file, with all the changes applied to the schema.