Skip to content

Commit

Permalink
Merge pull request #4433 from coralproject/fix/dsa-report-indices-rebase
Browse files Browse the repository at this point in the history
Add indices for `dsaReports` to `INDEXES.md`
  • Loading branch information
kabeaty authored Dec 4, 2023
2 parents 4916033 + 33ace1c commit dd10e64
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 dd10e64

Please sign in to comment.