mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/14742] Display message if reverting schema is in progress
PHPBB3-14742
This commit is contained in:
parent
4938887e5d
commit
3346609126
2 changed files with 9 additions and 4 deletions
|
@ -58,6 +58,7 @@ $lang = array_merge($lang, array(
|
||||||
'MIGRATION_REVERT_DATA_IN_PROGRESS' => 'Reverting Data: %1$s; Time: %2$.2f seconds',
|
'MIGRATION_REVERT_DATA_IN_PROGRESS' => 'Reverting Data: %1$s; Time: %2$.2f seconds',
|
||||||
'MIGRATION_REVERT_DATA_RUNNING' => 'Reverting Data: %s.',
|
'MIGRATION_REVERT_DATA_RUNNING' => 'Reverting Data: %s.',
|
||||||
'MIGRATION_REVERT_SCHEMA_DONE' => 'Reverted Schema: %1$s; Time: %2$.2f seconds',
|
'MIGRATION_REVERT_SCHEMA_DONE' => 'Reverted Schema: %1$s; Time: %2$.2f seconds',
|
||||||
|
'MIGRATION_REVERT_SCHEMA_IN_PROGRESS' => 'Reverting Schema: %1$s; Time: %2$.2f seconds',
|
||||||
'MIGRATION_REVERT_SCHEMA_RUNNING' => 'Reverting Schema: %s.',
|
'MIGRATION_REVERT_SCHEMA_RUNNING' => 'Reverting Schema: %s.',
|
||||||
|
|
||||||
'MIGRATION_INVALID_DATA_MISSING_CONDITION' => 'A migration is invalid. An if statement helper is missing a condition.',
|
'MIGRATION_INVALID_DATA_MISSING_CONDITION' => 'A migration is invalid. An if statement helper is missing a condition.',
|
||||||
|
|
|
@ -454,7 +454,7 @@ class migrator
|
||||||
$this->set_migration_state($name, $state);
|
$this->set_migration_state($name, $state);
|
||||||
|
|
||||||
$elapsed_time = microtime(true) - $elapsed_time;
|
$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);
|
$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_data_state'] = ($result === true) ? '' : $result;
|
||||||
$state['migration_schema_done'] = ($result === true) ? false : true;
|
$state['migration_schema_done'] = ($result === true) ? false : true;
|
||||||
|
|
||||||
|
$elapsed_time = microtime(true) - $elapsed_time;
|
||||||
if (!$state['migration_schema_done'])
|
if (!$state['migration_schema_done'])
|
||||||
{
|
{
|
||||||
$sql = 'DELETE FROM ' . $this->migrations_table . "
|
$sql = 'DELETE FROM ' . $this->migrations_table . "
|
||||||
|
@ -481,10 +482,13 @@ class migrator
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
|
||||||
unset($this->migration_state[$name]);
|
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;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue