mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-18 23:11:29 +00:00
Adding both the share and edit ids as unique indexes, should speed up DB query time
This commit is contained in:
@@ -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 : ""},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user