mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-04-11 02:11:47 +08:00
WIP: [questions][fix] workaround for prisma bug
This commit is contained in:
parent
2126cede0b
commit
d96053dbbe
@ -1,8 +0,0 @@
|
|||||||
-- AlterTable
|
|
||||||
ALTER TABLE "QuestionsQuestion" ADD COLUMN "contentSearch" TSVECTOR
|
|
||||||
GENERATED ALWAYS AS
|
|
||||||
to_tsvector('english', coalesce(content, ''))
|
|
||||||
STORED;
|
|
||||||
|
|
||||||
-- CreateIndex
|
|
||||||
CREATE INDEX "QuestionsQuestion_contentSearch_idx" ON "QuestionsQuestion" USING GIN("textSearch");
|
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "QuestionsQuestion" ADD COLUMN "contentSearch" tsvector;
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "QuestionsQuestion_contentSearch_idx" ON "QuestionsQuestion" USING GIN ("contentSearch");
|
||||||
@ -415,9 +415,9 @@ model QuestionsQuestion {
|
|||||||
comments QuestionsQuestionComment[]
|
comments QuestionsQuestionComment[]
|
||||||
answers QuestionsAnswer[]
|
answers QuestionsAnswer[]
|
||||||
|
|
||||||
contentSearch Unsupported("TSVECTOR")?
|
contentSearch Unsupported("tsvector")? @default(dbgenerated())
|
||||||
|
|
||||||
@@index([contentSearch])
|
@@index([contentSearch], type: Gin)
|
||||||
@@index([lastSeenAt, id])
|
@@index([lastSeenAt, id])
|
||||||
@@index([upvotes, id])
|
@@index([upvotes, id])
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user