diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-12-29 09:33:28 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-12-29 10:04:39 +0100 |
commit | 319d072e8eb7266cd8d33e0bb2fb5ebe76c487d1 (patch) | |
tree | 33735d94f0f928e80486f82bcc21fdf233b5b445 /server/models/video.js | |
parent | 67bf9b96bbcd92b069fe86d9223fe0f8b9c6e677 (diff) | |
download | PeerTube-319d072e8eb7266cd8d33e0bb2fb5ebe76c487d1.tar.gz PeerTube-319d072e8eb7266cd8d33e0bb2fb5ebe76c487d1.tar.zst PeerTube-319d072e8eb7266cd8d33e0bb2fb5ebe76c487d1.zip |
Server: Add postgresql indexes
Diffstat (limited to 'server/models/video.js')
-rw-r--r-- | server/models/video.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server/models/video.js b/server/models/video.js index 3ebc48ad4..d1595ce51 100644 --- a/server/models/video.js +++ b/server/models/video.js | |||
@@ -82,6 +82,26 @@ module.exports = function (sequelize, DataTypes) { | |||
82 | } | 82 | } |
83 | }, | 83 | }, |
84 | { | 84 | { |
85 | indexes: [ | ||
86 | { | ||
87 | fields: [ 'authorId' ] | ||
88 | }, | ||
89 | { | ||
90 | fields: [ 'remoteId' ] | ||
91 | }, | ||
92 | { | ||
93 | fields: [ 'name' ] | ||
94 | }, | ||
95 | { | ||
96 | fields: [ 'createdAt' ] | ||
97 | }, | ||
98 | { | ||
99 | fields: [ 'duration' ] | ||
100 | }, | ||
101 | { | ||
102 | fields: [ 'infoHash' ] | ||
103 | } | ||
104 | ], | ||
85 | classMethods: { | 105 | classMethods: { |
86 | associate, | 106 | associate, |
87 | 107 | ||