diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-08-11 01:25:45 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-08-11 01:25:45 +0200 |
commit | 3346609126893799169dc678da732d99d506fb9f (patch) | |
tree | 5a49cd07d45fc0e3f7c90d0e151d8343e2b72a92 /phpBB/phpbb/db/migrator.php | |
parent | 4938887e5d446637aac9a36f87ea26898dc31b80 (diff) | |
download | forums-3346609126893799169dc678da732d99d506fb9f.tar forums-3346609126893799169dc678da732d99d506fb9f.tar.gz forums-3346609126893799169dc678da732d99d506fb9f.tar.bz2 forums-3346609126893799169dc678da732d99d506fb9f.tar.xz forums-3346609126893799169dc678da732d99d506fb9f.zip |
[ticket/14742] Display message if reverting schema is in progress
PHPBB3-14742
Diffstat (limited to 'phpBB/phpbb/db/migrator.php')
-rw-r--r-- | phpBB/phpbb/db/migrator.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 000859f418..030afe07ad 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -454,7 +454,7 @@ class migrator $this->set_migration_state($name, $state); $elapsed_time = microtime(true) - $elapsed_time; - if ($state['migration_data_done']) + if (!$state['migration_data_done']) { $this->output_handler->write(array('MIGRATION_REVERT_DATA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL); } @@ -474,6 +474,7 @@ class migrator $state['migration_data_state'] = ($result === true) ? '' : $result; $state['migration_schema_done'] = ($result === true) ? false : true; + $elapsed_time = microtime(true) - $elapsed_time; if (!$state['migration_schema_done']) { $sql = 'DELETE FROM ' . $this->migrations_table . " @@ -481,10 +482,13 @@ class migrator $this->db->sql_query($sql); unset($this->migration_state[$name]); - } - $elapsed_time = microtime(true) - $elapsed_time; - $this->output_handler->write(array('MIGRATION_REVERT_SCHEMA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL); + $this->output_handler->write(array('MIGRATION_REVERT_SCHEMA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL); + } + else + { + $this->output_handler->write(array('MIGRATION_REVERT_SCHEMA_IN_PROGRESS', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_VERY_VERBOSE); + } } return true; |