Skip to content

Commit

Permalink
updated the environment_id index to be a partia index (#4436)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Jain <[email protected]>
Co-authored-by: Amit Kumar Das <[email protected]>
Co-authored-by: Saranya Jena <[email protected]>
  • Loading branch information
3 people authored Feb 15, 2024
1 parent 1ba88a9 commit a8a2872
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chaoscenter/graphql/server/pkg/database/mongodb/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ func (m *MongoClient) initAllCollection() {
Keys: bson.M{
"environment_id": 1,
},
Options: options.Index().SetUnique(true),
Options: options.Index().SetUnique(true).SetPartialFilterExpression(bson.D{{
"is_removed", false,
}}),
},
{
Keys: bson.M{
Expand Down

0 comments on commit a8a2872

Please sign in to comment.