Explorar o código

Fix db primary key

ghorsington %!s(int64=5) %!d(string=hai) anos
pai
achega
1b0f54ef23
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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)