diff options
author | Cesar G <prototech91@gmail.com> | 2014-11-06 19:02:52 -0800 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-11-07 02:30:44 -0800 |
commit | 95140bb724e2b7a9b70240c0e30afbbe96427286 (patch) | |
tree | f12bfae8f68289d8d9f2e531b94cc22db490f969 /phpBB/phpbb/db/migrator.php | |
parent | a1b58d05d158ff7afd789c1b27821e17198f8d58 (diff) | |
download | forums-95140bb724e2b7a9b70240c0e30afbbe96427286.tar forums-95140bb724e2b7a9b70240c0e30afbbe96427286.tar.gz forums-95140bb724e2b7a9b70240c0e30afbbe96427286.tar.bz2 forums-95140bb724e2b7a9b70240c0e30afbbe96427286.tar.xz forums-95140bb724e2b7a9b70240c0e30afbbe96427286.zip |
[ticket/13303] Speed up migration dependency calculation.
PHPBB3-13303
Diffstat (limited to 'phpBB/phpbb/db/migrator.php')
-rw-r--r-- | phpBB/phpbb/db/migrator.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 621a808a03..d03496eae3 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -59,6 +59,13 @@ class migrator protected $migrations = array(); /** + * Array of migrations that have been determined to be fulfillable + * + * @var array + */ + protected $fulfillable_migrations = array(); + + /** * 'name,' 'class,' and 'state' of the last migration run * * 'effectively_installed' set and set to true if the migration was effectively_installed @@ -653,7 +660,7 @@ class migrator */ public function unfulfillable($name) { - if (isset($this->migration_state[$name])) + if (isset($this->migration_state[$name]) || isset($this->fulfillable_migrations[$name])) { return false; } @@ -674,6 +681,7 @@ class migrator return $unfulfillable; } } + $this->fulfillable_migrations[$name] = true; return false; } |