diff --git a/lib/storage.js b/lib/storage.js index cc0bcaf..94fe4a2 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -40,6 +40,9 @@ Storage.prototype._createIndexes = function() { this.db.collection(collections.COPAYERS_LOOKUP).createIndex({ copayerId: 1 }); + this.db.collection(collections.COPAYERS_LOOKUP).createIndex({ + walletId: 1 + }); this.db.collection(collections.TXS).createIndex({ walletId: 1, id: 1, @@ -53,6 +56,9 @@ Storage.prototype._createIndexes = function() { walletId: 1, createdOn: -1, }); + this.db.collection(collections.TXS).createIndex({ + txid: 1 + }); this.db.collection(collections.NOTIFICATIONS).createIndex({ walletId: 1, id: 1, @@ -79,6 +85,14 @@ Storage.prototype._createIndexes = function() { walletId: 1, txid: 1, }); + this.db.collection(collections.PREFERENCES).createIndex({ + walletId: 1 + }); + this.db.collection(collections.FIAT_RATES).createIndex({ + provider: 1, + code: 1, + ts: 1 + }); this.db.collection(collections.PUSH_NOTIFICATION_SUBS).createIndex({ copayerId: 1, });