mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-08 15:21:27 +02:00
add Article model index on field user
This commit is contained in:
@@ -28,7 +28,13 @@ var ArticleSchema = new Schema({
|
||||
user: {
|
||||
type: Schema.ObjectId,
|
||||
ref: 'User'
|
||||
},
|
||||
test: {
|
||||
type: String,
|
||||
default: 'def'
|
||||
}
|
||||
});
|
||||
|
||||
ArticleSchema.index({user: -1, created: -1});
|
||||
|
||||
mongoose.model('Article', ArticleSchema);
|
||||
|
||||
Reference in New Issue
Block a user