Merge pull request #595 from isocolsky/fix/index

Fix db indexes
This commit is contained in:
Matias Alejo Garcia 2016-10-31 15:33:24 -03:00 committed by GitHub
commit 968273f450
1 changed files with 5 additions and 7 deletions

View File

@ -46,6 +46,10 @@ Storage.prototype._createIndexes = function() {
isPending: 1,
txid: 1,
});
this.db.collection(collections.TXS).createIndex({
walletId: 1,
createdOn: -1,
});
this.db.collection(collections.NOTIFICATIONS).createIndex({
walletId: 1,
id: 1,
@ -65,13 +69,7 @@ Storage.prototype._createIndexes = function() {
type: 1,
key: 1,
});
this.db.collection(collections.ADDRESSES).dropIndex({
walletId: 1
});
this.db.collection(collections.TX_NOTES).dropIndex({
this.db.collection(collections.TX_NOTES).createIndex({
walletId: 1,
txid: 1,
});