Introduce mandatary migration on startup, to minimum version
This commit is contained in:
parent
f38647dfa5
commit
02675312c5
5 changed files with 122 additions and 49 deletions
|
|
@ -125,8 +125,10 @@ function initializeMigrations({
|
|||
loadMessage: MessageType.createAttachmentLoader(loadAttachmentData),
|
||||
Migrations0DatabaseWithAttachmentData,
|
||||
Migrations1DatabaseWithoutAttachmentData,
|
||||
upgradeMessageSchema: message =>
|
||||
MessageType.upgradeSchema(message, {
|
||||
upgradeMessageSchema: (message, options = {}) => {
|
||||
const { maxVersion } = options;
|
||||
|
||||
return MessageType.upgradeSchema(message, {
|
||||
writeNewAttachmentData: createWriterForNew(attachmentsPath),
|
||||
getRegionCode,
|
||||
getAbsoluteAttachmentPath,
|
||||
|
|
@ -136,7 +138,9 @@ function initializeMigrations({
|
|||
makeImageThumbnail,
|
||||
makeVideoScreenshot,
|
||||
logger,
|
||||
}),
|
||||
maxVersion,
|
||||
});
|
||||
},
|
||||
writeMessageAttachments: MessageType.createAttachmentDataWriter({
|
||||
writeExistingAttachmentData: createWriterForExisting(attachmentsPath),
|
||||
logger,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue