Browse Source

adds new DB index

master
Matias Alejo Garcia 7 years ago
parent
commit
0d839a1c74
No known key found for this signature in database GPG Key ID: 2470DB551277AB3
  1. 14
      lib/storage.js

14
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,
});

Loading…
Cancel
Save