// 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 }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter