Conditionally run post-attachment migrations
Introduce placeholder migrations for Backbone models so they never implicitly run migrations whenever they are `fetch`ed. We prefer to run our migrations explicitly upon app startup and then let Backbone models be (slightly) dumb(er) models, without inadvertently triggering migrations.
This commit is contained in:
parent
887bd83852
commit
805031ade8
6 changed files with 87 additions and 25 deletions
|
@ -6,7 +6,7 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
const { Migrations0DatabaseWithAttachmentData } = window.Signal.Migrations;
|
||||
const { getPlaceholderMigrations } = window.Signal.Migrations;
|
||||
|
||||
window.Whisper = window.Whisper || {};
|
||||
window.Whisper.Database = window.Whisper.Database || {};
|
||||
|
@ -123,5 +123,5 @@
|
|||
request.onsuccess = resolve;
|
||||
}));
|
||||
|
||||
Whisper.Database.migrations = Migrations0DatabaseWithAttachmentData.migrations;
|
||||
Whisper.Database.migrations = getPlaceholderMigrations();
|
||||
}());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue