fix: update mongo version collection have unique index.

This commit is contained in:
Monet Lee 2024-07-18 21:40:32 +08:00
parent 81c6c0acc3
commit 3424fc07ad

View File

@ -34,7 +34,9 @@ func (l *VersionLogMgo) initIndex(ctx context.Context) error {
Keys: bson.M{
"d_id": 1,
},
Options: options.Index().SetUnique(true),
})
return err
}