Skip to content

Commit 4db2853

Browse files
committed
add userid_1 index on audit
1 parent 80bc7ff commit 4db2853

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

OpenFlow/src/DatabaseConnection.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3616,6 +3616,9 @@ export class DatabaseConnection extends events.EventEmitter {
36163616
if (indexnames.indexOf("_acl") === -1) {
36173617
await this.createIndex(collection.name, "_acl", { "_acl._id": 1, "_acl.rights": 1, "_acl.deny": 1 }, null, span)
36183618
}
3619+
if (indexnames.indexOf("userid_1") === -1) {
3620+
await this.createIndex(collection.name, "userid_1", { "userid": 1 }, null, span)
3621+
}
36193622
break;
36203623
case "users":
36213624
if (indexnames.indexOf("name_1") === -1) {
@@ -3666,12 +3669,12 @@ export class DatabaseConnection extends events.EventEmitter {
36663669
if (indexnames.indexOf("_modified_1") === -1) {
36673670
await this.createIndex(collection.name, "_modified_1", { "_modified": 1 }, null, span)
36683671
}
3669-
// if (indexnames.indexOf("collection_1_timestamp_1") === -1) {
3670-
// await this.createIndex(collection.name, "collection_1_timestamp_1", { _type: 1, "{collection:1,timestamp:1}": 1 }, null, span)
3671-
// }
3672-
// if (indexnames.indexOf("collection_1_timestamp_1_userid_1") === -1) {
3673-
// await this.createIndex(collection.name, "collection_1_timestamp_1_userid_1", { _type: 1, "{collection:1,timestamp:1,userid:1}": 1 }, null, span)
3674-
// }
3672+
if (indexnames.indexOf("collection_1_timestamp_1_userid_1") === -1) {
3673+
await this.createIndex(collection.name, "collection_1_timestamp_1_userid_1", { _type: 1, "{collection:1,timestamp:1,userid:1}": 1 }, null, span)
3674+
}
3675+
if (indexnames.indexOf("timestamp_1_userid_1") === -1) {
3676+
await this.createIndex(collection.name, "timestamp_1_userid_1", { _type: 1, "{timestamp:1,userid:1}": 1 }, null, span)
3677+
}
36753678
if (indexnames.indexOf("timestamp_1") === -1) {
36763679
await this.createIndex(collection.name, "timestamp_1", { _type: 1, "{timestamp:1}": 1 }, null, span)
36773680
}

0 commit comments

Comments
 (0)