mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/migrations] Change migration data processing to run step by step
This commit is contained in:
parent
ce021710fb
commit
91a921a96b
1 changed files with 23 additions and 1 deletions
|
@ -167,7 +167,7 @@ class phpbb_db_migrator
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$migration->update_data();
|
$this->process_data_step($migration);
|
||||||
$state['migration_data_done'] = true;
|
$state['migration_data_done'] = true;
|
||||||
$state['migration_end_time'] = time();
|
$state['migration_end_time'] = time();
|
||||||
}
|
}
|
||||||
|
@ -182,6 +182,28 @@ class phpbb_db_migrator
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function process_data_step(&$migration)
|
||||||
|
{
|
||||||
|
$continue = false;
|
||||||
|
$steps = $migration->update_data();
|
||||||
|
|
||||||
|
foreach ($steps as $step)
|
||||||
|
{
|
||||||
|
$continue = $this->run_step($step);
|
||||||
|
if (!$continue)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
function run_step(&$step)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function insert_migration($name, $state)
|
function insert_migration($name, $state)
|
||||||
{
|
{
|
||||||
$migration_row = $state;
|
$migration_row = $state;
|
||||||
|
|
Loading…
Add table
Reference in a new issue