Remove usage of storage
module
This commit is contained in:
parent
8966e80284
commit
d5d0eabdfd
2 changed files with 2 additions and 10 deletions
|
@ -89,7 +89,7 @@
|
||||||
await Migrations0DatabaseWithAttachmentData.run({ Backbone });
|
await Migrations0DatabaseWithAttachmentData.run({ Backbone });
|
||||||
|
|
||||||
console.log('Migrate attachments to disk');
|
console.log('Migrate attachments to disk');
|
||||||
await MessageDataMigrator.processAll({ Backbone, storage, upgradeMessageSchema });
|
await MessageDataMigrator.processAll({ Backbone, upgradeMessageSchema });
|
||||||
|
|
||||||
console.log('Migrate database without attachments');
|
console.log('Migrate database without attachments');
|
||||||
await Migrations1DatabaseWithoutAttachmentData.run({
|
await Migrations1DatabaseWithoutAttachmentData.run({
|
||||||
|
|
|
@ -77,19 +77,11 @@ exports.processNext = async ({
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.processAll = async ({
|
exports.processAll = async ({ Backbone, upgradeMessageSchema } = {}) => {
|
||||||
Backbone,
|
|
||||||
storage,
|
|
||||||
upgradeMessageSchema,
|
|
||||||
} = {}) => {
|
|
||||||
if (!isObject(Backbone)) {
|
if (!isObject(Backbone)) {
|
||||||
throw new TypeError('"Backbone" is required');
|
throw new TypeError('"Backbone" is required');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isObject(storage)) {
|
|
||||||
throw new TypeError('"storage" is required');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isFunction(upgradeMessageSchema)) {
|
if (!isFunction(upgradeMessageSchema)) {
|
||||||
throw new TypeError('"upgradeMessageSchema" is required');
|
throw new TypeError('"upgradeMessageSchema" is required');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue