소스 검색

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)