Indexes should always include the 'type' property...

...since it is implicitly added to all selectors
This commit is contained in:
Timothy Farrell 2018-07-15 23:30:51 -05:00
parent d32eb0d728
commit 4fba94f1fa
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "pouchtype",
"version": "1.0.0",
"version": "1.0.1",
"description": "Document Management Layer for PouchDB",
"main": "src/index.js",
"files": ["dist", "lib", "src"],

View File

@ -124,7 +124,7 @@ export class TypeHandler {
return this.db.createIndex({
index: {
ddoc: `${this.type}_${name}`,
fields: fields,
fields: fields.indexOf('type') === -1 ? fields.concat('type') : fields,
name
}
});