Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
Add invite TTL index
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakShearman committed Jun 25, 2023
1 parent 6a0736f commit cc704e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/repository/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ var (
Keys: bson.D{{Key: "partyId", Value: 1}, {Key: "targetId", Value: 1}},
Options: options.Index().SetName("partyId_targetId").SetUnique(true),
},
{
Keys: bson.M{"expiresAt": 1},
Options: options.Index().SetName("expiresAt_TTL").SetExpireAfterSeconds(0),
},
}
)

Expand Down

0 comments on commit cc704e8

Please sign in to comment.