Last active
October 10, 2022 10:42
-
-
Save kuc-arc-f/79fc7be9a275d7e695bda51580665035 to your computer and use it in GitHub Desktop.
chat app, prisma migration
This file contains 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 = "postgresql" | |
url = env("DATABASE_URL") | |
} | |
generator client { | |
provider = "prisma-client-js" | |
} | |
model User { | |
id Int @id @default(autoincrement()) | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
password String | |
email String @unique | |
name String? | |
} | |
model Task { | |
id Int @id @default(autoincrement()) | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
title String @db.VarChar(255) | |
content String? @db.Text | |
userId Int? | |
} | |
model Token { | |
id Int @id @default(autoincrement()) | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
token String? @db.Text | |
secret String? @db.Text | |
expire_datetime DateTime @default(now()) | |
userId Int? | |
} | |
model Chat { | |
id Int @id @default(autoincrement()) | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
name String @db.Text | |
content String? @db.Text | |
userId Int? | |
} | |
model ChatPost { | |
id Int @id @default(autoincrement()) | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
chatId Int? | |
userId Int? | |
title String @db.Text | |
body String @db.Text | |
} | |
model Thread { | |
id Int @id @default(autoincrement()) | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
chatId Int? | |
chatPostId Int? | |
userId Int? | |
title String @db.Text | |
body String @db.Text | |
} | |
model BookMark { | |
id Int @id @default(autoincrement()) | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
chatId Int? | |
chatPostId Int? | |
userId Int? | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment