schema.prisma
Sun Dec 10 2023 04:54:59 GMT+0000 (Coordinated Universal Time)
Saved by
@Jeremicah
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
//Make a new model Use pascal case in naming. Also make the name in singular
//create model > npx prisma format > npx prisma migrate dev
model Issue {
id Int @id @default(autoincrement())
title String @db.VarChar(255)
description String @db.Text
status Status @default(OPEN)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
//enum is set of constanst values
enum Status {
OPEN
IN_PROGRESS
CLOSED
}
content_copyCOPY
Comments