feat: updated task list index
All checks were successful
Build and Push App Image / build-and-push (push) Successful in 1m30s
All checks were successful
Build and Push App Image / build-and-push (push) Successful in 1m30s
This commit is contained in:
@@ -196,8 +196,7 @@ func (r *TaskListRepository) DeleteTaskListsBySpaceID(ctx context.Context, space
|
|||||||
|
|
||||||
func (r *TaskListRepository) EnsureIndexes(ctx context.Context) error {
|
func (r *TaskListRepository) EnsureIndexes(ctx context.Context) error {
|
||||||
_, err := r.collection.Indexes().CreateMany(ctx, []mongo.IndexModel{
|
_, err := r.collection.Indexes().CreateMany(ctx, []mongo.IndexModel{
|
||||||
{Keys: bson.D{{Key: "space_id", Value: 1}, {Key: "name", Value: 1}}, Options: options.Index().SetUnique(true)},
|
{Keys: bson.D{{Key: "space_id", Value: 1}, {Key: "category_id", Value: 1}, {Key: "name", Value: 1}}, Options: options.Index().SetUnique(true)},
|
||||||
{Keys: bson.D{{Key: "space_id", Value: 1}, {Key: "category_id", Value: 1}}},
|
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user