Add indexes

This commit is contained in:
2023-08-12 19:08:22 +02:00
parent c4fa52adb3
commit cdb16b4ddb
2 changed files with 859 additions and 857 deletions

View File

@@ -16,6 +16,7 @@ model AuthorAnnotation {
file String? @db.VarChar(256)
author Author @relation(fields: [author_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "fk_author_annotations_authors_id_author")
@@index([author_id], map: "author_annotation_author_id")
@@map("author_annotations")
}
@@ -43,6 +44,7 @@ model BookAnnotation {
file String? @db.VarChar(256)
book Book @relation(fields: [book_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "fk_book_annotations_books_id_book")
@@index([book_id], map: "book_annotation_book_id")
@@map("book_annotations")
}