mirror of
https://github.com/zadam/trilium.git
synced 2024-11-17 13:14:44 +08:00
25 lines
No EOL
571 B
JavaScript
25 lines
No EOL
571 B
JavaScript
"use strict";
|
|
|
|
const optionService = require('../../services/options');
|
|
const migrationService = require('../../services/migration');
|
|
const appInfo = require('../../services/app_info');
|
|
|
|
async function getMigrationInfo() {
|
|
return {
|
|
dbVersion: parseInt(await optionService.getOption('dbVersion')),
|
|
appDbVersion: appInfo.dbVersion
|
|
};
|
|
}
|
|
|
|
async function executeMigration() {
|
|
const migrations = await migrationService.migrate();
|
|
|
|
return {
|
|
migrations: migrations
|
|
};
|
|
}
|
|
|
|
module.exports = {
|
|
getMigrationInfo,
|
|
executeMigration
|
|
}; |