Created
December 14, 2020 23:02
-
-
Save kuccello/bcc75870df754080771d411493f2e582 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is your Prisma schema file, | |
// learn more about it in the docs: https://pris.ly/d/prisma-schema | |
datasource db { | |
provider = "sqlite" | |
url = env("DATABASE_URL") | |
} | |
generator client { | |
provider = "prisma-client-js" | |
} | |
model User { | |
id Int @id @default(autoincrement()) | |
createdAt DateTime @default(now()) | |
email String @unique | |
name String? | |
posts Post[] | |
} | |
model Post { | |
id Int @id @default(autoincrement()) | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
published Boolean @default(false) | |
title String | |
author User? @relation(fields: [authorId], references: [id]) | |
authorId Int? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment