diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-23 20:13:30 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-24 14:04:05 +0200 |
commit | 8cd72bd37724054f8942f2fefc7aa2e60eca74cf (patch) | |
tree | f2ed8da2a5a804286335156283659e9eaec5291a /server/models/activitypub | |
parent | 5bcfd02974389e1a131496d22f4321a79bed0fbb (diff) | |
download | PeerTube-8cd72bd37724054f8942f2fefc7aa2e60eca74cf.tar.gz PeerTube-8cd72bd37724054f8942f2fefc7aa2e60eca74cf.tar.zst PeerTube-8cd72bd37724054f8942f2fefc7aa2e60eca74cf.zip |
Optimize SQL queries
Diffstat (limited to 'server/models/activitypub')
-rw-r--r-- | server/models/activitypub/actor.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index 38a689fea..267032e2a 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts | |||
@@ -80,7 +80,8 @@ enum ScopeNames { | |||
80 | tableName: 'actor', | 80 | tableName: 'actor', |
81 | indexes: [ | 81 | indexes: [ |
82 | { | 82 | { |
83 | fields: [ 'url' ] | 83 | fields: [ 'url' ], |
84 | unique: true | ||
84 | }, | 85 | }, |
85 | { | 86 | { |
86 | fields: [ 'preferredUsername', 'serverId' ], | 87 | fields: [ 'preferredUsername', 'serverId' ], |
@@ -94,6 +95,13 @@ enum ScopeNames { | |||
94 | }, | 95 | }, |
95 | { | 96 | { |
96 | fields: [ 'avatarId' ] | 97 | fields: [ 'avatarId' ] |
98 | }, | ||
99 | { | ||
100 | fields: [ 'uuid' ], | ||
101 | unique: true | ||
102 | }, | ||
103 | { | ||
104 | fields: [ 'followersUrl' ] | ||
97 | } | 105 | } |
98 | ] | 106 | ] |
99 | }) | 107 | }) |