Skip to content

Commit

Permalink
Update index on registration.creatorHash to compound index includin…
Browse files Browse the repository at this point in the history
…g `meta.created`.
  • Loading branch information
mandyvenables committed Mar 6, 2024
1 parent 3220137 commit 4166543
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# bedrock-tokenization ChangeLog

## 22.0.0 - 2024-03-xx

### Changed
- **BREAKING**: Update index on `registration.creatorHash` to compound index
including `meta.created`. Existing deployments will need to drop the current
index.

## 21.1.1 - 2024-02-27

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion lib/documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ bedrock.events.on('bedrock-mongodb.ready', async () => {
fields: {'registration.externalIdHash': 1, 'registration.documentHash': 1},
options: {unique: true, background: false}
}, {
// index for the `getCount` query
collection: 'tokenization-registration',
fields: {'registration.creatorHash': 1},
fields: {'registration.creatorHash': 1, 'meta.created': 1},
options: {unique: false, background: false}
}];

Expand Down

0 comments on commit 4166543

Please sign in to comment.