From a8c3e7038a932cd9ea4df469e07fd73b7f3e56c0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 15 Apr 2018 12:40:48 +0900 Subject: [PATCH] oops --- src/models/user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/user.ts b/src/models/user.ts index 449a56300..1d23c21db 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -27,7 +27,7 @@ User.createIndex('username'); User.createIndex('usernameLower'); User.createIndex(['username', 'host'], { unique: true }); User.createIndex(['usernameLower', 'host'], { unique: true }); -User.createIndex('token', { unique: true }); +User.createIndex('token', { sparse: true, unique: true }); User.createIndex('uri', { sparse: true, unique: true }); export default User;