mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 02:14:13 +00:00
debug messaging to see how long each migration takes
This commit is contained in:
@@ -330,11 +330,14 @@ class CI_Migration {
|
|||||||
foreach ($pending as $number => $migration)
|
foreach ($pending as $number => $migration)
|
||||||
{
|
{
|
||||||
log_message('debug', 'Migrating '.$method.' from version '.$current_version.' to version '.$number);
|
log_message('debug', 'Migrating '.$method.' from version '.$current_version.' to version '.$number);
|
||||||
|
$start_time = microtime(TRUE);
|
||||||
|
|
||||||
$migration[0] = new $migration[0];
|
$migration[0] = new $migration[0];
|
||||||
call_user_func($migration);
|
call_user_func($migration);
|
||||||
$current_version = $number;
|
$current_version = $number;
|
||||||
$this->_update_version($current_version);
|
$this->_update_version($current_version);
|
||||||
|
$duration = microtime(TRUE) - $start_time;
|
||||||
|
log_message('debug', 'Migration '.$number.' completed in '.number_format($duration, 3).'s');
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is necessary when moving down, since the the last migration applied
|
// This is necessary when moving down, since the the last migration applied
|
||||||
|
|||||||
Reference in New Issue
Block a user