aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-10-07 14:03:02 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-10-07 14:03:02 +0200
commit64641f9b1f2043884898cd6eef3d358ef4c1c575 (patch)
tree61bd728b2b25b393561ab5af6a81f76ae18c822b /phpBB/phpbb/db
parentf68d5a59e6cc153318a5146d67188753f5a20ef7 (diff)
parent60099cf97c13106b741ab779883a89a0dbc4b6fa (diff)
downloadforums-64641f9b1f2043884898cd6eef3d358ef4c1c575.tar
forums-64641f9b1f2043884898cd6eef3d358ef4c1c575.tar.gz
forums-64641f9b1f2043884898cd6eef3d358ef4c1c575.tar.bz2
forums-64641f9b1f2043884898cd6eef3d358ef4c1c575.tar.xz
forums-64641f9b1f2043884898cd6eef3d358ef4c1c575.zip
Merge pull request #3904 from Zoddo/ticket/14162
[ticket/14162] Add CLI commands to manage migrations
Diffstat (limited to 'phpBB/phpbb/db')
-rw-r--r--phpBB/phpbb/db/migrator.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index 6902913c64..18c6403c07 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -416,6 +416,9 @@ class migrator
if ($state['migration_data_done'])
{
+ $this->output_handler->write(array('MIGRATION_REVERT_DATA_RUNNING', $name), migrator_output_handler_interface::VERBOSITY_VERBOSE);
+ $elapsed_time = microtime(true);
+
if ($state['migration_data_state'] !== 'revert_data')
{
$result = $this->process_data_step($migration->update_data(), $state['migration_data_state'], true);
@@ -431,9 +434,22 @@ class migrator
}
$this->set_migration_state($name, $state);
+
+ $elapsed_time = microtime(true) - $elapsed_time;
+ if ($state['migration_data_done'])
+ {
+ $this->output_handler->write(array('MIGRATION_REVERT_DATA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL);
+ }
+ else
+ {
+ $this->output_handler->write(array('MIGRATION_REVERT_DATA_IN_PROGRESS', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_VERY_VERBOSE);
+ }
}
else if ($state['migration_schema_done'])
{
+ $this->output_handler->write(array('MIGRATION_REVERT_SCHEMA_RUNNING', $name), migrator_output_handler_interface::VERBOSITY_VERBOSE);
+ $elapsed_time = microtime(true);
+
$steps = $this->helper->get_schema_steps($migration->revert_schema());
$result = $this->process_data_step($steps, $state['migration_data_state']);
@@ -448,6 +464,9 @@ class migrator
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);
}
return true;