Skip to content

Commit

Permalink
add dsaReports indices to INDEXES.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-funk committed Nov 27, 2023
1 parent 9ebe6c8 commit ce59faa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions INDEXES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ The goal of this document is to date-mark the indexes you add to support the cha

If you are releasing, you can use this readme to check all the indexes prior to the release you are deploying and have a good idea of what indexes you might need to deploy to Mongo along with your release of a new Coral Docker image to kubernetes.

## 2023-11-24

```
db.dsaReports.createIndex({ tenantID: 1, id: 1 }, { unique: true });
```

- This index creates the uniqueness constraint for the `tenantID` and `id` fields on the `dsaReports`

```
db.dsaReports.createIndex({ status: 1, createdAt: 1, tenantID: 1 });
db.dsaReports.createIndex({ referenceID: 1, tenantID: 1 });
db.dsaReports.createIndex({ submissionID: 1, tenantID: 1 });
```

- These indices are used to optimize pagination of `dsaReports` and allow them to be retrieved by their `referenceID`, `submissionID` efficiently.

## 2023-10-18

```
Expand Down

0 comments on commit ce59faa

Please sign in to comment.