diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-08-10 14:32:00 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-08-11 01:03:23 +0200 |
commit | 9fb649793de65a598615c542861281ff15a60439 (patch) | |
tree | 72c46a69517012adb7934131cf681c87f600609b /phpBB/phpbb/db/migrator.php | |
parent | 2dae36e3fbde62c73c0ea08f5acd4e1629ebae34 (diff) | |
download | forums-9fb649793de65a598615c542861281ff15a60439.tar forums-9fb649793de65a598615c542861281ff15a60439.tar.gz forums-9fb649793de65a598615c542861281ff15a60439.tar.bz2 forums-9fb649793de65a598615c542861281ff15a60439.tar.xz forums-9fb649793de65a598615c542861281ff15a60439.zip |
[ticket/14742] Pause after each schema change
It is certainly better than running them all at once
PHPBB3-14742
Diffstat (limited to 'phpBB/phpbb/db/migrator.php')
-rw-r--r-- | phpBB/phpbb/db/migrator.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 7fc3e787e2..739959d7b7 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -308,7 +308,14 @@ class migrator $state['migration_data_state'] = ($result === true) ? '' : $result; $state['migration_schema_done'] = ($result === true); - $this->output_handler->write(array('MIGRATION_SCHEMA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL); + if ($state['migration_schema_done']) + { + $this->output_handler->write(array('MIGRATION_SCHEMA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL); + } + else + { + $this->output_handler->write(array('MIGRATION_SCHEMA_IN_PROGRESS', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_VERY_VERBOSE); + } } else if (!$state['migration_data_done']) { @@ -493,8 +500,10 @@ class migrator try { // Result will be null or true if everything completed correctly + // After any schema update step we allow to pause, since + // database changes can take quite some time $result = $this->run_step($step, $last_result, $revert); - if ($result !== null && $result !== true) + if ($result !== null && $result !== true && strpos($step[0], 'dbtools') !== 0) { return serialize(array( 'result' => $result, |