mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 04:33:50 +01:00
Better indexes
This commit is contained in:
parent
15e4b59fb0
commit
7be3cd869a
@ -22,9 +22,9 @@ import SwSubscription, { deleteSwSubscription } from './sw-subscription';
|
||||
|
||||
const User = db.get<IUser>('users');
|
||||
|
||||
User.createIndex('username');
|
||||
User.createIndex('usernameLower');
|
||||
User.createIndex('token');
|
||||
User.createIndex(['username', 'host'], { unique: true });
|
||||
User.createIndex(['usernameLower', 'host'], { unique: true });
|
||||
User.createIndex('token', { unique: true });
|
||||
User.createIndex('uri', { sparse: true, unique: true });
|
||||
|
||||
export default User;
|
||||
|
Loading…
Reference in New Issue
Block a user