Commit 90004763 authored by Benjamin Bouvier's avatar Benjamin Bouvier
Browse files

Run migrations after an import;

parent f6b7f824
......@@ -10,6 +10,8 @@ import OperationType from '../models/operationtype';
import Config from '../models/config';
import Cozy from '../models/cozyinstance';
import { run as runMigrations } from '../models/migrations';
import { makeLogger, KError, asyncErr } from '../helpers';
let log = makeLogger('controllers/all');
......@@ -350,6 +352,10 @@ module.exports.import = async function(req, res) {
}
log.info('Done.');
log.info('Running migrations...');
await runMigrations();
log.info('Done.');
log.info('Import finished with success!');
res.sendStatus(200);
} catch (err) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment