Keep object stores after conversations migrate to SQLCipher
This commit is contained in:
parent
bc0ec92ad2
commit
7532f397ea
3 changed files with 15 additions and 24 deletions
|
@ -131,10 +131,7 @@
|
|||
deleteAttachmentData,
|
||||
getCurrentVersion,
|
||||
} = window.Signal.Migrations;
|
||||
const {
|
||||
Migrations0DatabaseWithAttachmentData,
|
||||
Migrations1DatabaseWithoutAttachmentData,
|
||||
} = window.Signal.Migrations;
|
||||
const { Migrations0DatabaseWithAttachmentData } = window.Signal.Migrations;
|
||||
const { Views } = window.Signal;
|
||||
|
||||
// Implicitly used in `indexeddb-backbonejs-adapter`:
|
||||
|
@ -391,20 +388,6 @@
|
|||
|
||||
Views.Initialization.setMessage(window.i18n('optimizingApplication'));
|
||||
|
||||
window.log.info('Running cleanup IndexedDB migrations...');
|
||||
await Whisper.Database.close();
|
||||
|
||||
// Now we clean up IndexedDB database after extracting data from it
|
||||
await Migrations1DatabaseWithoutAttachmentData.run({
|
||||
Backbone,
|
||||
logger: window.log,
|
||||
});
|
||||
|
||||
const latestDBVersion = _.last(
|
||||
Migrations1DatabaseWithoutAttachmentData.migrations
|
||||
).version;
|
||||
Whisper.Database.migrations[0].version = latestDBVersion;
|
||||
|
||||
window.log.info('Cleanup: starting...');
|
||||
const messagesForCleanup = await window.Signal.Data.getOutgoingWithoutExpiresAt(
|
||||
{
|
||||
|
@ -452,9 +435,6 @@
|
|||
|
||||
Views.Initialization.setMessage(window.i18n('loading'));
|
||||
|
||||
// Note: We are not invoking the second set of IndexedDB migrations because it is
|
||||
// likely that any future migrations will simply extracting things from IndexedDB.
|
||||
|
||||
idleDetector = new IdleDetector();
|
||||
let isMigrationWithIndexComplete = false;
|
||||
window.log.info(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue