Skip to content

Commit 2a9b22f

Browse files
committed
index user for project schema
1 parent 563f57d commit 2a9b22f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/models/project.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,7 @@ projectSchema.methods.isSlugUnique = async function isSlugUnique() {
7676
};
7777
};
7878

79+
projectSchema.index({ user: 1 }, { collation: { locale: 'en', strength: 2 } });
80+
7981
export default mongoose.models.Project ||
8082
mongoose.model('Project', projectSchema);

0 commit comments

Comments
 (0)