Skip to content

Commit

Permalink
GIN INDEX
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Nov 27, 2023
1 parent fa27de8 commit 0ffe995
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
generator client {
provider = "prisma-client-js"
previewFeatures = ["postgresqlExtensions", "views"]
}

datasource db {
provider = "postgresql"
url = env("POSTGRES_URL")
}

generator client {
provider = "prisma-client-js"
previewFeatures = ["views"]
}

generator markdown {
provider = "prisma-markdown"
title = "PROJECT"
Expand Down Expand Up @@ -64,6 +64,8 @@ model attachment_files {
//----
bbs_article_snapshot_files bbs_article_snapshot_files[]
bbs_article_comment_snapshots_files bbs_article_comment_snapshot_files[]
@@index([url])
}

/// Article entity.
Expand Down Expand Up @@ -172,6 +174,8 @@ model bbs_article_snapshots {
mv_last mv_bbs_article_last_snapshots?
@@index([bbs_article_id, created_at])
@@index([title(ops: raw("gin_trgm_ops"))], type: Gin)
@@index([body(ops: raw("gin_trgm_ops"))], type: Gin)
}

/// Attachment file of article snapshot.
Expand Down Expand Up @@ -339,6 +343,7 @@ model bbs_article_comment_snapshots {
to_files bbs_article_comment_snapshot_files[]
@@index([bbs_article_comment_id, created_at])
@@index([body(ops: raw("gin_trgm_ops"))], type: Gin)
}

/// Attachment file of comment snapshot.
Expand Down

0 comments on commit 0ffe995

Please sign in to comment.