瀏覽代碼

Fix db primary key

ghorsington 5 年之前
父節點
當前提交
1b0f54ef23
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      db/src/entity/ContestVote.ts

+ 1 - 2
db/src/entity/ContestVote.ts

@@ -9,8 +9,7 @@ export class ContestVote {
     userId: string;
 
     // :thonq
-    @PrimaryColumn()
-    @ManyToOne(type => Contest, contest => contest.votes)
+    @ManyToOne(type => Contest, contest => contest.votes, { primary: true })
     contest: Contest;
 
     @ManyToOne(type => ContestEntry, entry => entry.votes)