From a89de383d9869687e719636fd66599c4626bf68d Mon Sep 17 00:00:00 2001 From: Zeke Abshire Date: Sun, 3 Nov 2024 21:56:16 -0600 Subject: [PATCH] updated prisma file --- prisma/schema.prisma | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 600d123..31af068 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -6,24 +6,9 @@ generator client { } datasource db { - provider = "postgresql" - // NOTE: When using mysql or sqlserver, uncomment the @db.Text annotations in model Account below - // Further reading: - // 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]) + provider = "postgresql" + url = env("POSTGRES_PRISMA_URL") // uses connection pooling + directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection } // Necessary for Next auth @@ -62,7 +47,7 @@ model User { image String? accounts Account[] sessions Session[] - posts Post[] + // posts Post[] } model VerificationToken {