mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-02 16:16:39 +08:00
修改数据库
This commit is contained in:
parent
9c2a23b1df
commit
4a8498232b
@ -1,9 +1,14 @@
|
|||||||
// This is your Prisma schema file,
|
// This is your Prisma schema file,
|
||||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||||
|
|
||||||
|
// datasource db {
|
||||||
|
// provider = "postgresql"
|
||||||
|
// url = env("POSTGRES_PRISMA_URL") // uses connection pooling
|
||||||
|
// // directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
|
||||||
|
// }
|
||||||
datasource db {
|
datasource db {
|
||||||
provider = "postgresql"
|
provider = "mysql"
|
||||||
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
|
url = env("DATABASE_URL") // uses connection pooling
|
||||||
// directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
|
// directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14,7 +19,7 @@ generator client {
|
|||||||
|
|
||||||
model User {
|
model User {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
name String? @unique
|
name String?
|
||||||
// if you are using Github OAuth, you can get rid of the username attribute (that is for Twitter OAuth)
|
// if you are using Github OAuth, you can get rid of the username attribute (that is for Twitter OAuth)
|
||||||
username String? @unique
|
username String? @unique
|
||||||
gh_username String? @unique
|
gh_username String? @unique
|
||||||
@ -28,8 +33,6 @@ model User {
|
|||||||
isAdmin Boolean? @default(false)
|
isAdmin Boolean? @default(false)
|
||||||
accounts Account[]
|
accounts Account[]
|
||||||
sessions Session[]
|
sessions Session[]
|
||||||
// sites Site[]
|
|
||||||
// posts Post[]
|
|
||||||
logs LogEntry[]
|
logs LogEntry[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user