Added the reindexing of all tables to the upgrade procedures.

pull/796/head
iglocska 2015-12-25 00:31:49 +01:00
parent 85db894063
commit 22b02c4075
1 changed files with 6 additions and 1 deletions

View File

@ -2273,9 +2273,14 @@ class Server extends AppModel {
foreach ($orgMapping as $old => $new) {
$this->query('UPDATE `correlations` SET `org_id` = "' . $new . '", `org` = "" WHERE `org` = "' . $old . '";');
}
if (Configure::read('MISP.background_jobs') && $jobId) {
$this->Job->saveField('progress', 60);
$this->Job->saveField('message', 'Correlations rebuilt. Indexing all tables.');
}
$this->updateDatabase('indexTables');
if (Configure::read('MISP.background_jobs') && $jobId) {
$this->Job->saveField('progress', 100);
$this->Job->saveField('message', 'Correlations rebuilt');
$this->Job->saveField('message', 'Upgrade complete.');
}
}