Add an index on message.expireTimer
This allows us to query all expiring messages on startup.
This commit is contained in:
parent
b3e932dce8
commit
b888e01044
1 changed files with 10 additions and 0 deletions
|
@ -179,6 +179,16 @@
|
||||||
});
|
});
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
version: "10.0",
|
||||||
|
migrate: function(transaction, next) {
|
||||||
|
console.log('migration 10.0');
|
||||||
|
console.log('creating expiring message index');
|
||||||
|
var messages = transaction.objectStore('messages');
|
||||||
|
messages.createIndex('expire', 'expireTimer', { unique: false });
|
||||||
|
next();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Reference in a new issue