Browse Source

create compound index for walletId, createdOn. drop old index

activeAddress
Ivan Socolsky 9 years ago
parent
commit
c8d8af7d1d
  1. 8
      lib/storage.js

8
lib/storage.js

@ -50,7 +50,8 @@ Storage.prototype._createIndexes = function() {
id: 1,
});
this.db.collection(collections.ADDRESSES).createIndex({
walletId: 1
walletId: 1,
createdOn: 1,
});
this.db.collection(collections.ADDRESSES).createIndex({
address: 1,
@ -63,6 +64,11 @@ Storage.prototype._createIndexes = function() {
type: 1,
key: 1,
});
this.db.collection(collections.ADDRESSES).dropIndex({
walletId: 1
});
};
Storage.prototype.connect = function(opts, cb) {

Loading…
Cancel
Save