Ctrl K
ComunidadGuías…

examples/extend-full-text-search/schema.prisma

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
// This file is automatically generated by Keystone, do not modify it manually.
// Modify your Keystone config when you want to change this.

datasource postgresql {
  provider = "postgresql"
}

generator client {
  provider = "prisma-client"
  output   = "./generated/prisma"

  previewFeatures = ["fullTextSearchPostgres"]
}

model Post {
  id       String  @id @default(cuid())
  title    String  @default("")
  content  String  @default("")
  author   Author? @relation("Post_author", fields: [authorId], references: [id])
  authorId String? @map("author")

  @@index([authorId])
}

model Author {
  id    String @id @default(cuid())
  name  String @default("")
  email String @unique @default("")
  posts Post[] @relation("Post_author")
}