Add unique index on video comment url
authorChocobozzz <me@florianbigard.com>
Fri, 26 Jan 2018 13:14:43 +0000 (14:14 +0100)
committerChocobozzz <me@florianbigard.com>
Fri, 26 Jan 2018 13:14:43 +0000 (14:14 +0100)
server/models/video/video-comment.ts

index ab909b0b81c3ea9ecda79ff180a7a07d3da58892..868d04ff9e0a7b381e78a63d8e05553d309d8001 100644 (file)
@@ -104,6 +104,10 @@ enum ScopeNames {
     },
     {
       fields: [ 'videoId', 'originCommentId' ]
+    },
+    {
+      fields: [ 'url' ],
+      unique: true
     }
   ]
 })