]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/constants.ts
Add migration to delete old Authors table
[github/Chocobozzz/PeerTube.git] / server / initializers / constants.ts
index 100a77622f5ce2f214da8703d2111a0f23eee84b..3a5a557d4c001a9afc0b43c1b1b2c0389d1ab57f 100644 (file)
@@ -9,7 +9,7 @@ import { isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core
 
 // ---------------------------------------------------------------------------
 
-const LAST_MIGRATION_VERSION = 140
+const LAST_MIGRATION_VERSION = 145
 
 // ---------------------------------------------------------------------------
 
@@ -26,6 +26,7 @@ const SORTABLE_COLUMNS = {
   VIDEO_ABUSES: [ 'id', 'createdAt' ],
   VIDEO_CHANNELS: [ 'id', 'name', 'updatedAt', 'createdAt' ],
   VIDEOS: [ 'name', 'duration', 'createdAt', 'views', 'likes' ],
+  VIDEO_COMMENT_THREADS: [ 'createdAt' ],
   BLACKLISTS: [ 'id', 'name', 'duration', 'views', 'likes', 'dislikes', 'uuid', 'createdAt' ],
   FOLLOWERS: [ 'createdAt' ],
   FOLLOWING: [ 'createdAt' ]
@@ -175,6 +176,10 @@ const CONSTRAINTS_FIELDS = {
   },
   VIDEO_EVENTS: {
     COUNT: { min: 0 }
+  },
+  VIDEO_COMMENTS: {
+    TEXT: { min: 2, max: 3000 }, // Length
+    URL: { min: 3, max: 2000 } // Length
   }
 }