Skip to content

Commit 8511ca3

Browse files
changed index fields order
1 parent 7bfa27e commit 8511ca3

File tree

1 file changed

+2
-2
lines changed
  • lib/interface/cli/commands/offline-logs

1 file changed

+2
-2
lines changed

lib/interface/cli/commands/offline-logs/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const checkRemnant = function (lowerBound, cutoffDateObj) {
3535
///////////////////////////////////////////////////////////////
3636
const ensureIndex = async function (database, collection) {
3737
const collectionObj = database.collection(collection);
38-
const indexName = "jobId_1_accountId_1_time_1";
38+
const indexName = "accountId_1_jobId_1_time_1";
3939

4040
const indexExist = await collectionObj.indexExists(indexName)
4141

@@ -60,7 +60,7 @@ const ensureIndex = async function (database, collection) {
6060
}
6161

6262
await collectionObj.createIndex(
63-
{ jobId: 1, accountId: 1, time: 1 },
63+
{ accountId: 1, jobId: 1, time: 1 },
6464
);
6565
console.info(
6666
`index was created for collection '${collection}'`

0 commit comments

Comments
 (0)