add index to workspace to improve query

This commit is contained in:
Maidul Islam
2023-12-04 19:41:40 -05:00
parent 8b1eaad7b5
commit 6a744c96e5
+2 -1
View File
@@ -18,7 +18,8 @@ const machineMembershipSchema = new Schema<IMachineMembership>(
workspace: { workspace: {
type: Schema.Types.ObjectId, type: Schema.Types.ObjectId,
ref: "Workspace", ref: "Workspace",
required: true required: true,
index: true,
}, },
role: { role: {
type: String, type: String,