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('users'); +User.createIndex('username'); +User.createIndex('usernameLower'); User.createIndex(['username', 'host'], { unique: true }); User.createIndex(['usernameLower', 'host'], { unique: true }); User.createIndex('token', { unique: true });