0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-09 18:28:45 +00:00

Adding both the share and edit ids as unique indexes, should speed up DB query time

This commit is contained in:
Scott Tolksdorf
2016-05-14 13:15:46 -04:00
parent c1d7443c87
commit 9c1fd5b13a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -3,8 +3,8 @@ var shortid = require('shortid');
var _ = require('lodash');
var HomebrewSchema = mongoose.Schema({
shareId : {type : String, default: shortid.generate},
editId : {type : String, default: shortid.generate},
shareId : {type : String, default: shortid.generate, index: { unique: true }},
editId : {type : String, default: shortid.generate, index: { unique: true }},
title : {type : String, default : ""},
text : {type : String, default : ""},