mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Run database migrations when opening board. Not when updating WeKan.
Thanks to xet7 !
This commit is contained in:
parent
ea30612013
commit
2b5c56484a
20 changed files with 2508 additions and 118 deletions
46
client/components/migrationProgress.js
Normal file
46
client/components/migrationProgress.js
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import { Template } from 'meteor/templating';
|
||||
import { migrationManager } from '/imports/lib/migrationManager';
|
||||
|
||||
Template.migrationProgress.helpers({
|
||||
isMigrating() {
|
||||
return migrationManager.isMigrating.get();
|
||||
},
|
||||
|
||||
migrationProgress() {
|
||||
return migrationManager.migrationProgress.get();
|
||||
},
|
||||
|
||||
migrationStatus() {
|
||||
return migrationManager.migrationStatus.get();
|
||||
},
|
||||
|
||||
migrationCurrentStep() {
|
||||
return migrationManager.migrationCurrentStep.get();
|
||||
},
|
||||
|
||||
migrationEstimatedTime() {
|
||||
return migrationManager.migrationEstimatedTime.get();
|
||||
},
|
||||
|
||||
migrationSteps() {
|
||||
const steps = migrationManager.migrationSteps.get();
|
||||
const currentStep = migrationManager.migrationCurrentStep.get();
|
||||
|
||||
return steps.map(step => ({
|
||||
...step,
|
||||
isCurrentStep: step.name === currentStep
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
Template.migrationProgress.onCreated(function() {
|
||||
// Subscribe to migration state changes
|
||||
this.autorun(() => {
|
||||
migrationManager.isMigrating.get();
|
||||
migrationManager.migrationProgress.get();
|
||||
migrationManager.migrationStatus.get();
|
||||
migrationManager.migrationCurrentStep.get();
|
||||
migrationManager.migrationEstimatedTime.get();
|
||||
migrationManager.migrationSteps.get();
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue