From: Chocobozzz Date: Fri, 26 Jan 2018 13:14:43 +0000 (+0100) Subject: Add unique index on video comment url X-Git-Tag: v0.0.16-alpha~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0776d83f2cf5825f5cd7915d1cf217572d560f1b;p=oweals%2Fpeertube.git Add unique index on video comment url --- 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 { }, { fields: [ 'videoId', 'originCommentId' ] + }, + { + fields: [ 'url' ], + unique: true } ] })