Skip to content

Commit 256a8a9

Browse files
committed
Move ipc call into actual running migration
1 parent 66d6a47 commit 256a8a9

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/migrations/1.20.0-beta.0.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const ipc = require('hadron-ipc');
12
const debug = require('debug')('mongodb-compass:migrations');
23
const { ConnectionIndexedDBCollection } = require('./connection-indexeddb');
34
const Connection = require('./connection-disk');
@@ -115,6 +116,7 @@ const moveToDiskStorage = (done) => {
115116
};
116117

117118
module.exports = (previousVersion, currentVersion, callback) => {
119+
ipc.call('compass:loading:change-status', { status: `migrating to ${currentVersion}` });
118120
moveToDiskStorage(function(err) {
119121
if (err) {
120122
debug('encountered an error in the migration', err);

src/app/migrations/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const Model = require('ampersand-model');
33
const storageMixin = require('storage-mixin');
44
const semver = require('semver');
55
const electronApp = require('electron').remote.app;
6-
const ipc = require('hadron-ipc');
76

87
const debug = require('debug')('mongodb-compass:migrations');
98

@@ -48,7 +47,6 @@ function getPreviousVersion(done) {
4847
}
4948

5049
module.exports = function(done) {
51-
ipc.call('compass:loading:change-status', { status: 'running migrations' });
5250
getPreviousVersion(function(err, previousVersion) {
5351
if (err) {
5452
done(err);

0 commit comments

Comments
 (0)