mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-19 11:01: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 _ = require('lodash');
|
||||||
|
|
||||||
var HomebrewSchema = mongoose.Schema({
|
var HomebrewSchema = mongoose.Schema({
|
||||||
shareId : {type : String, default: shortid.generate},
|
shareId : {type : String, default: shortid.generate, index: { unique: true }},
|
||||||
editId : {type : String, default: shortid.generate},
|
editId : {type : String, default: shortid.generate, index: { unique: true }},
|
||||||
title : {type : String, default : ""},
|
title : {type : String, default : ""},
|
||||||
text : {type : String, default : ""},
|
text : {type : String, default : ""},
|
||||||
|
|
||||||
|
|||||||
2
todo.md
2
todo.md
@@ -20,7 +20,7 @@ X Rename `/client/naturalCrit` -> `/client/main`
|
|||||||
X Move snippets into their new groups
|
X Move snippets into their new groups
|
||||||
- Replace pseudo-elements with encoded images
|
- Replace pseudo-elements with encoded images
|
||||||
- Make hybrid editor and brewRenderer (with resize listeners)
|
- Make hybrid editor and brewRenderer (with resize listeners)
|
||||||
- add /source/shareId route
|
X add /source/shareId route
|
||||||
- Add stats nav item
|
- Add stats nav item
|
||||||
- make both ids indexes in mongoose
|
- make both ids indexes in mongoose
|
||||||
X Fix main Page
|
X Fix main Page
|
||||||
|
|||||||
Reference in New Issue
Block a user