diff options
| author | Tristan Darricau <github@nicofuma.fr> | 2014-11-07 11:38:40 +0100 |
|---|---|---|
| committer | Tristan Darricau <github@nicofuma.fr> | 2014-11-07 11:38:40 +0100 |
| commit | 8956ec0bd4b81f4a13838a3c94239ea95e509e5f (patch) | |
| tree | f12bfae8f68289d8d9f2e531b94cc22db490f969 | |
| parent | a1b58d05d158ff7afd789c1b27821e17198f8d58 (diff) | |
| parent | 95140bb724e2b7a9b70240c0e30afbbe96427286 (diff) | |
| download | forums-8956ec0bd4b81f4a13838a3c94239ea95e509e5f.tar forums-8956ec0bd4b81f4a13838a3c94239ea95e509e5f.tar.gz forums-8956ec0bd4b81f4a13838a3c94239ea95e509e5f.tar.bz2 forums-8956ec0bd4b81f4a13838a3c94239ea95e509e5f.tar.xz forums-8956ec0bd4b81f4a13838a3c94239ea95e509e5f.zip | |
Merge pull request #3117 from prototech/ticket/13303
[ticket/13303] Speed up migration dependency calculation.
* prototech/ticket/13303:
[ticket/13303] Speed up migration dependency calculation.
| -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; } |
