mirror of
https://github.com/moparisthebest/mail
synced 2024-08-13 16:43:47 -04:00
18 lines
494 B
JavaScript
18 lines
494 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Update handler for transition database version 5 -> 6
|
|
*/
|
|
function update(options) {
|
|
var emailDbType = 'email_',
|
|
versionDbType = 'dbVersion',
|
|
postUpdateDbVersion = 6;
|
|
|
|
// remove the emails
|
|
return options.userStorage.removeList(emailDbType).then(function() {
|
|
// update the database version to postUpdateDbVersion
|
|
return options.appConfigStorage.storeList([postUpdateDbVersion], versionDbType);
|
|
});
|
|
}
|
|
|
|
module.exports = update; |