updated prisma file
This commit is contained in:
@@ -6,24 +6,9 @@ generator client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
provider = "postgresql"
|
provider = "postgresql"
|
||||||
// NOTE: When using mysql or sqlserver, uncomment the @db.Text annotations in model Account below
|
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
|
||||||
// Further reading:
|
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
|
||||||
// https://next-auth.js.org/adapters/prisma#create-the-prisma-schema
|
|
||||||
// https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#string
|
|
||||||
url = env("DATABASE_URL")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Post {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String
|
|
||||||
createdAt DateTime @default(now())
|
|
||||||
updatedAt DateTime @updatedAt
|
|
||||||
|
|
||||||
createdBy User @relation(fields: [createdById], references: [id])
|
|
||||||
createdById String
|
|
||||||
|
|
||||||
@@index([name])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Necessary for Next auth
|
// Necessary for Next auth
|
||||||
@@ -62,7 +47,7 @@ model User {
|
|||||||
image String?
|
image String?
|
||||||
accounts Account[]
|
accounts Account[]
|
||||||
sessions Session[]
|
sessions Session[]
|
||||||
posts Post[]
|
// posts Post[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model VerificationToken {
|
model VerificationToken {
|
||||||
|
|||||||
Reference in New Issue
Block a user