Skip to content

Commit fe340ba

Browse files
committed
ensure unique date index
1 parent 1bf737a commit fe340ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/Request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var requestSchema = mongoose.Schema({
2525
'1_0': Number,
2626
'bandwidth': Number
2727
});
28-
28+
requestSchema.index({date: 1}, {unique: true});
2929
requestSchema.plugin(findOrCreate);
3030

3131
var Request = mongoose.model('Request', requestSchema);

0 commit comments

Comments
 (0)