This commit is contained in:
dahyeon committed 2026-04-25 16:13:45 -07:00
1 parent d1f7b0c916
commit 90a7cf6a7e
4 files changed
+150 -8

No files matched your search

+17 -5
View File
@@ -524,21 +524,33 @@ UserSchema.index(
{ communityId: 1, identityId: 1 },
{
unique: true,
partialFilterExpression: { identityId: { $exists: true } },
partialFilterExpression: { identityId: { $type: 'objectId' } },
},
);
UserSchema.index({ identityId: 1 }, { sparse: true });
UserSchema.index(
{ identityId: 1 },
{ partialFilterExpression: { identityId: { $type: 'objectId' } } },
);
UserSchema.index(
{ communityId: 1, kakaoTalkId: 1 },
{ unique: true, sparse: true },
{
unique: true,
partialFilterExpression: { kakaoTalkId: { $type: 'string' } },
},
);
UserSchema.index(
{ communityId: 1, discordId: 1 },
{ unique: true, sparse: true },
{
unique: true,
partialFilterExpression: { discordId: { $type: 'string' } },
},
);
UserSchema.index(
{ communityId: 1, 'riotAccounts.puuid': 1 },
{ unique: true, sparse: true },
{
unique: true,
partialFilterExpression: { 'riotAccounts.puuid': { $type: 'string' } },
},
);
export const RiotMatchSchema = new Schema<RiotMatch>(