diff options
Diffstat (limited to 'phpBB/includes/db/migrator.php')
-rw-r--r-- | phpBB/includes/db/migrator.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/phpBB/includes/db/migrator.php b/phpBB/includes/db/migrator.php index de9c06948c..95a28618e8 100644 --- a/phpBB/includes/db/migrator.php +++ b/phpBB/includes/db/migrator.php @@ -63,7 +63,9 @@ class phpbb_db_migrator protected $migrations = array(); /** - * 'name' and 'class' of the last migration run + * 'name,' 'class,' and 'state' of the last migration run + * + * 'effectively_installed' set and set to true if the migration was effectively_installed * * @var array */ @@ -174,7 +176,7 @@ class phpbb_db_migrator 'migration_start_time' => time(), 'migration_end_time' => time(), ); - $this->insert_migration($name, $state); + $this->set_migration_state($name, $state); } } @@ -304,6 +306,7 @@ class phpbb_db_migrator $this->last_run_migration = array( 'name' => $name, 'class' => $migration, + 'state' => $state, ); if (!isset($this->migration_state[$name])) @@ -318,6 +321,8 @@ class phpbb_db_migrator 'migration_start_time' => 0, 'migration_end_time' => 0, ); + + $this->last_run_migration['effectively_installed'] = true; } else { @@ -350,7 +355,7 @@ class phpbb_db_migrator } } - $this->insert_migration($name, $state); + $this->set_migration_state($name, $state); return true; } @@ -422,7 +427,7 @@ class phpbb_db_migrator $state['migration_data_done'] = ($result === true) ? false : true; } - $this->insert_migration($name, $state); + $this->set_migration_state($name, $state); } else { @@ -641,7 +646,7 @@ class phpbb_db_migrator * @param array $state * @return null */ - protected function insert_migration($name, $state) + protected function set_migration_state($name, $state) { $migration_row = $state; $migration_row['migration_depends_on'] = serialize($state['migration_depends_on']); @@ -662,6 +667,8 @@ class phpbb_db_migrator } $this->migration_state[$name] = $state; + + $this->last_run_migration['state'] = $state; } /** |