mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-08-20 01:34:05 -05:00
chore: add indexes for commonly queried data
This commit is contained in:
@@ -130,6 +130,11 @@ const PNIDSchema = new Schema<IPNID, PNIDModel, IPNIDMethods>({
|
||||
}
|
||||
}, { id: false });
|
||||
|
||||
PNIDSchema.index({ pid: 1 });
|
||||
PNIDSchema.index({ usernameLower: 1 });
|
||||
// Used for the admin panel querying
|
||||
PNIDSchema.index({ 'pid': 1, 'username': 1, 'connections.discord.id': 1 });
|
||||
|
||||
PNIDSchema.plugin(uniqueValidator, { message: '{PATH} already in use.' });
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user