portfolio/prisma/schema.prisma

70 lines
1.6 KiB
Plaintext
Raw Normal View History

2023-01-17 21:24:16 +00:00
// 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"
previewFeatures = ["multiSchema"]
2023-01-17 21:24:16 +00:00
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
schemas = ["public", "auth"]
2023-01-17 21:24:16 +00:00
}
2023-04-03 22:15:21 +00:00
model View {
2023-01-17 21:24:16 +00:00
slug String @id
count BigInt @default(1)
@@schema("public")
2023-04-03 22:15:21 +00:00
@@map("Views")
}
model Account {
id String @id @default(cuid())
userId String
type String
provider String
providerAccountId String
refresh_token String? @db.Text
access_token String? @db.Text
expires_at Int?
token_type String?
scope String?
id_token String? @db.Text
session_state String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([provider, providerAccountId])
@@schema("auth")
}
model Session {
id String @id @default(cuid())
sessionToken String @unique
userId String
expires DateTime
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@schema("auth")
}
model User {
id String @id @default(cuid())
name String?
email String? @unique
emailVerified DateTime?
image String?
accounts Account[]
sessions Session[]
@@schema("auth")
}
model VerificationToken {
identifier String
token String @unique
expires DateTime
@@unique([identifier, token])
@@schema("auth")
2023-01-17 21:24:16 +00:00
}