Skip to content

Commit 464b54c

Browse files
Егор КоноваловЕгор Коновалов
authored andcommitted
fix(): repetitions timestamp index on collection creation
1 parent 8ac4394 commit 464b54c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/resolvers/project.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const { GitHubService } = require('../integrations/github/service');
1414
const EVENTS_GROUP_HASH_INDEX_NAME = 'groupHashUnique';
1515
const REPETITIONS_GROUP_HASH_INDEX_NAME = 'groupHash_hashed';
1616
const REPETITIONS_USER_ID_INDEX_NAME = 'userId';
17+
const REPETITIONS_TIMESTAMP_INDEX_NAME = 'timestamp';
1718
const EVENTS_TIMESTAMP_INDEX_NAME = 'timestamp';
1819
const EVENTS_PAYLOAD_RELEASE_INDEX_NAME = 'payloadRelease';
1920
const GROUPING_TIMESTAMP_INDEX_NAME = 'groupingTimestamp';
@@ -213,6 +214,13 @@ module.exports = {
213214
sparse: true,
214215
});
215216

217+
await projectRepetitionsEventsCollection.createIndex({
218+
timestamp: 1,
219+
}, {
220+
name: REPETITIONS_TIMESTAMP_INDEX_NAME,
221+
sparse: true,
222+
});
223+
216224
await projectEventsCollection.createIndex({
217225
timestamp: 1,
218226
}, {

0 commit comments

Comments
 (0)