summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-01-21 21:45:11 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-01-21 21:45:11 +0900
commitb44227948d6a283e2f2579111f40d3f7460da31a (patch)
tree006752b372c606076aa83db464a8aa3929e889d3 /src
parent[Client] Fix #3321 (diff)
downloadmisskey-b44227948d6a283e2f2579111f40d3f7460da31a.tar.gz
misskey-b44227948d6a283e2f2579111f40d3f7460da31a.tar.bz2
misskey-b44227948d6a283e2f2579111f40d3f7460da31a.zip
Add unique index
#3946
Diffstat (limited to 'src')
-rw-r--r--src/models/poll-vote.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/models/poll-vote.ts b/src/models/poll-vote.ts
index 4390e000c3..b8aceae3b0 100644
--- a/src/models/poll-vote.ts
+++ b/src/models/poll-vote.ts
@@ -4,6 +4,7 @@ import db from '../db/mongodb';
const PollVote = db.get<IPollVote>('pollVotes');
PollVote.createIndex('userId');
PollVote.createIndex('noteId');
+PollVote.createIndex(['userId', 'noteId'], { unique: true });
export default PollVote;
export interface IPollVote {