From 0776d83f2cf5825f5cd7915d1cf217572d560f1b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 26 Jan 2018 14:14:43 +0100 Subject: Add unique index on video comment url --- server/models/video/video-comment.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server/models') 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 } ] }) -- cgit v1.2.3