We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up Prisma as the ORM for database interaction and connect to a local Postgres instance.
Tasks:
npm install prisma @prisma/client npm install pg
backend/
npx prisma init
.env
DATABASE_URL="postgresql://user:password@localhost:5432/sidequest"
prisma/schema.prisma
model User { id Int @id @default(autoincrement()) username String @unique password String character Character } model Character { id Int @id @default(autoincrement()) type String level Int experience Int userId Int User User @relation(fields: [userId], references: [id]) }
npx prisma migrate dev
/api/status
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
valon-loshaj
No branches or pull requests
Set up Prisma as the ORM for database interaction and connect to a local Postgres instance.
Tasks:
backend/
folder:.env
file to include the Postgres connection string:prisma/schema.prisma
) for users, quests, and characters.Example:
npx prisma migrate dev
to create the initial migration and sync the schema with the Postgres database./api/status
.The text was updated successfully, but these errors were encountered: