aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 73626b6a0..215e26d7d 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -40,7 +40,7 @@ import {
40 isVideoDurationValid, 40 isVideoDurationValid,
41 isVideoLanguageValid, 41 isVideoLanguageValid,
42 isVideoLicenceValid, 42 isVideoLicenceValid,
43 isVideoNameValid, 43 isVideoNameValid, isVideoOriginallyPublishedAtValid,
44 isVideoPrivacyValid, 44 isVideoPrivacyValid,
45 isVideoStateValid, 45 isVideoStateValid,
46 isVideoSupportValid 46 isVideoSupportValid
@@ -103,11 +103,18 @@ const indexes: Sequelize.DefineIndexesOptions[] = [
103 103
104 { fields: [ 'createdAt' ] }, 104 { fields: [ 'createdAt' ] },
105 { fields: [ 'publishedAt' ] }, 105 { fields: [ 'publishedAt' ] },
106 { fields: [ 'originallyPublishedAt' ] },
107 { fields: [ 'duration' ] }, 106 { fields: [ 'duration' ] },
108 { fields: [ 'views' ] }, 107 { fields: [ 'views' ] },
109 { fields: [ 'channelId' ] }, 108 { fields: [ 'channelId' ] },
110 { 109 {
110 fields: [ 'originallyPublishedAt' ],
111 where: {
112 originallyPublishedAt: {
113 [Sequelize.Op.ne]: null
114 }
115 }
116 },
117 {
111 fields: [ 'category' ], // We don't care videos with an unknown category 118 fields: [ 'category' ], // We don't care videos with an unknown category
112 where: { 119 where: {
113 category: { 120 category: {
@@ -741,6 +748,8 @@ export class VideoModel extends Model<VideoModel> {
741 @Column 748 @Column
742 publishedAt: Date 749 publishedAt: Date
743 750
751 @AllowNull(true)
752 @Default(null)
744 @Column 753 @Column
745 originallyPublishedAt: Date 754 originallyPublishedAt: Date
746 755