aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/requestToPod.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-12-29 09:33:28 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-12-29 10:04:39 +0100
commit319d072e8eb7266cd8d33e0bb2fb5ebe76c487d1 (patch)
tree33735d94f0f928e80486f82bcc21fdf233b5b445 /server/models/requestToPod.js
parent67bf9b96bbcd92b069fe86d9223fe0f8b9c6e677 (diff)
downloadPeerTube-319d072e8eb7266cd8d33e0bb2fb5ebe76c487d1.tar.gz
PeerTube-319d072e8eb7266cd8d33e0bb2fb5ebe76c487d1.tar.zst
PeerTube-319d072e8eb7266cd8d33e0bb2fb5ebe76c487d1.zip
Server: Add postgresql indexes
Diffstat (limited to 'server/models/requestToPod.js')
-rw-r--r--server/models/requestToPod.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/models/requestToPod.js b/server/models/requestToPod.js
index 378c2bdcf..f42a53458 100644
--- a/server/models/requestToPod.js
+++ b/server/models/requestToPod.js
@@ -4,6 +4,18 @@
4 4
5module.exports = function (sequelize, DataTypes) { 5module.exports = function (sequelize, DataTypes) {
6 const RequestToPod = sequelize.define('RequestToPod', {}, { 6 const RequestToPod = sequelize.define('RequestToPod', {}, {
7 indexes: [
8 {
9 fields: [ 'requestId' ]
10 },
11 {
12 fields: [ 'podId' ]
13 },
14 {
15 fields: [ 'requestId', 'podId' ],
16 unique: true
17 }
18 ],
7 classMethods: { 19 classMethods: {
8 removePodOf 20 removePodOf
9 } 21 }