File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
migrations/20251201082716_article_summary Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ -- CreateTable
2+ CREATE TABLE "ArticleCopra " (
3+ " articleId" TEXT NOT NULL ,
4+ " summary" TEXT ,
5+ " tags" JSONB,
6+
7+ CONSTRAINT " ArticleCopra_pkey" PRIMARY KEY (" articleId" )
8+ );
9+
10+ -- AddForeignKey
11+ ALTER TABLE " ArticleCopra" ADD CONSTRAINT " ArticleCopra_articleId_fkey" FOREIGN KEY (" articleId" ) REFERENCES " Article" (" lid" ) ON DELETE RESTRICT ON UPDATE CASCADE;
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ model Article {
1313 snapshots ArticleSnapshot []
1414 replies ArticleReply []
1515
16+ copra ArticleCopra ?
17+
1618 @@index ([time ] )
1719 @@index ([authorId ] )
1820 @@index ([upvote (sort : Desc ) ] )
@@ -68,3 +70,11 @@ model ArticleReply {
6870 @@index ([authorId ] )
6971 @@index ([time ] )
7072}
73+
74+ model ArticleCopra {
75+ article Article @relation (fields : [articleId ] , references : [lid ] )
76+ articleId String @id
77+
78+ summary String ? @db.Text
79+ tags Json ?
80+ }
You can’t perform that action at this time.
0 commit comments