summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-14 14:42:18 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-14 14:42:18 +0900
commit08531e800251609515025b0f544d98e9145e6e0b (patch)
tree8b3656c57b401c8953cd78be38dfa13920f4bb28 /src
parentMerge branch 'master' of https://github.com/syuilo/misskey (diff)
downloadmisskey-08531e800251609515025b0f544d98e9145e6e0b.tar.gz
misskey-08531e800251609515025b0f544d98e9145e6e0b.tar.bz2
misskey-08531e800251609515025b0f544d98e9145e6e0b.zip
Add some indexes
Diffstat (limited to 'src')
-rw-r--r--src/models/user.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/models/user.ts b/src/models/user.ts
index cf5a4a3616..686bcc5ec5 100644
--- a/src/models/user.ts
+++ b/src/models/user.ts
@@ -22,6 +22,8 @@ import SwSubscription, { deleteSwSubscription } from './sw-subscription';
const User = db.get<IUser>('users');
+User.createIndex('username');
+User.createIndex('usernameLower');
User.createIndex(['username', 'host'], { unique: true });
User.createIndex(['usernameLower', 'host'], { unique: true });
User.createIndex('token', { unique: true });