mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Initialize schema as first step in upgradeSchema
This commit is contained in:
@@ -146,6 +146,9 @@ exports._mapAttachments = upgradeAttachment => async message =>
|
||||
}
|
||||
);
|
||||
|
||||
const toVersion0 = async message =>
|
||||
exports.initializeSchemaVersion(message);
|
||||
|
||||
const toVersion1 = exports._withSchemaVersion(
|
||||
1,
|
||||
exports._mapAttachments(Attachment.autoOrientJPEG)
|
||||
@@ -157,4 +160,4 @@ const toVersion2 = exports._withSchemaVersion(
|
||||
|
||||
// UpgradeStep
|
||||
exports.upgradeSchema = async message =>
|
||||
toVersion2(await toVersion1(message));
|
||||
toVersion2(await toVersion1(await toVersion0(message)));
|
||||
|
||||
Reference in New Issue
Block a user