diff --git a/content/200-orm/100-prisma-schema/10-overview/index.mdx b/content/200-orm/100-prisma-schema/10-overview/index.mdx index 462d421657..0a68988dfe 100644 --- a/content/200-orm/100-prisma-schema/10-overview/index.mdx +++ b/content/200-orm/100-prisma-schema/10-overview/index.mdx @@ -59,8 +59,8 @@ model Post { updatedAt DateTime @updatedAt published Boolean @default(false) title String @db.VarChar(255) - author User? @relation(fields: [authorId], references: [id]) - authorId Int? + author User @relation(fields: [authorId], references: [id]) + authorId Int } enum Role { @@ -97,7 +97,7 @@ model Post { updatedAt DateTime @updatedAt published Boolean @default(false) title String - author User? @relation(fields: [authorId], references: [id]) + author User @relation(fields: [authorId], references: [id]) authorId String @db.ObjectId } diff --git a/content/200-orm/100-prisma-schema/20-data-model/10-models.mdx b/content/200-orm/100-prisma-schema/20-data-model/10-models.mdx index 381faa1962..f12090e1c4 100644 --- a/content/200-orm/100-prisma-schema/20-data-model/10-models.mdx +++ b/content/200-orm/100-prisma-schema/20-data-model/10-models.mdx @@ -407,8 +407,8 @@ model Comment { id Int // Other fields //highlight-next-line - post Post? @relation(fields: [postId], references: [id]) // A comment can have one post - postId Int? + post Post @relation(fields: [postId], references: [id]) // A comment can have one post + postId Int } ``` @@ -424,11 +424,11 @@ model Post { } model Comment { - id String @id @default(auto()) @map("_id") @db.Objectid + id String @id @default(auto()) @map("_id") @db.Objectid // Other fields //highlight-next-line - post Post? @relation(fields: [postId], references: [id]) // A comment can have one post - postId String? @db.ObjectId + post Post @relation(fields: [postId], references: [id]) // A comment can have one post + postId String @db.ObjectId } ``` diff --git a/content/200-orm/100-prisma-schema/20-data-model/30-indexes.mdx b/content/200-orm/100-prisma-schema/20-data-model/30-indexes.mdx index ba4ec5c37f..9cbe28a016 100644 --- a/content/200-orm/100-prisma-schema/20-data-model/30-indexes.mdx +++ b/content/200-orm/100-prisma-schema/20-data-model/30-indexes.mdx @@ -206,9 +206,9 @@ model Example { id Int @id value Json // ^ field type matching the operator class - // ^ operator class ^ index type @@index([value(ops: JsonbPathOps)], type: Gin) + // ^ operator class ^ index type } ``` @@ -344,9 +344,9 @@ model Example { id Int @id value Int // ^ field type matching the operator class - // ^ operator class ^ index type @@index([value(ops: Int4BloomOps)], type: Brin) + // ^ operator class ^ index type } ```