Add missing mongoose index declarations
This commit is contained in:
+6
-4
@@ -5,10 +5,12 @@ var TxSchema = new Schema({
|
||||
txid: { type: String, lowercase: true, unique: true, index: true},
|
||||
vin: { type: Array, default: [] },
|
||||
vout: { type: Array, default: [] },
|
||||
total: { type: Number, default: 0 },
|
||||
timestamp: { type: Number, default: 0 },
|
||||
blockhash: { type: String },
|
||||
blockindex: {type: Number, default: 0},
|
||||
total: { type: Number, default: 0, index: true },
|
||||
timestamp: { type: Number, default: 0, index: true },
|
||||
blockhash: { type: String, index: true },
|
||||
blockindex: {type: Number, default: 0, index: true},
|
||||
}, {id: false});
|
||||
|
||||
TxSchema.index({total: 1, total: -1, blockindex: 1, blockindex: -1});
|
||||
|
||||
module.exports = mongoose.model('Tx', TxSchema);
|
||||
|
||||
Reference in New Issue
Block a user