diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-26 14:14:43 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-26 14:14:43 +0100 |
commit | 0776d83f2cf5825f5cd7915d1cf217572d560f1b (patch) | |
tree | 418ecbd94ab125ac6c6d1e0bd316106483b9383c | |
parent | ce97fe366e0fc532bb6b91c458067953fc5738d0 (diff) | |
download | PeerTube-0776d83f2cf5825f5cd7915d1cf217572d560f1b.tar.gz PeerTube-0776d83f2cf5825f5cd7915d1cf217572d560f1b.tar.zst PeerTube-0776d83f2cf5825f5cd7915d1cf217572d560f1b.zip |
Add unique index on video comment url
-rw-r--r-- | server/models/video/video-comment.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index ab909b0b8..868d04ff9 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -104,6 +104,10 @@ enum ScopeNames { | |||
104 | }, | 104 | }, |
105 | { | 105 | { |
106 | fields: [ 'videoId', 'originCommentId' ] | 106 | fields: [ 'videoId', 'originCommentId' ] |
107 | }, | ||
108 | { | ||
109 | fields: [ 'url' ], | ||
110 | unique: true | ||
107 | } | 111 | } |
108 | ] | 112 | ] |
109 | }) | 113 | }) |