Skip to content

Commit

Permalink
More indexes recommended by performance analyser
Browse files Browse the repository at this point in the history
Fixed a breaking bug in the down migration #1875
  • Loading branch information
iamleeg committed Oct 1, 2021
1 parent b8cbdb2 commit cd4fda1
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ const indexes = [
'revisionMetadata.creationMetadata.date': -1,
},
},
{
name: 'sourceAndUploadId',
key: {
'caseReference.sourceId': 1,
'caseReference.uploadIds': 1,
},
},
{
name: 'bySourceIfListed',
key: {
'caseReference.sourceId': 1,
'list': 1,
}
},
];

module.exports = {
Expand All @@ -30,7 +44,7 @@ module.exports = {
async down(db, client) {
await db.command({
dropIndexes: 'cases',
indexes: ['sourceAndVerificationStatus', 'byDateIfListed']
index: ['sourceAndVerificationStatus', 'byDateIfListed', 'sourceAndUploadId', 'bySourceIfListed']
});
}
};

0 comments on commit cd4fda1

Please sign in to comment.