From 95140bb724e2b7a9b70240c0e30afbbe96427286 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Thu, 6 Nov 2014 19:02:52 -0800 Subject: [ticket/13303] Speed up migration dependency calculation. PHPBB3-13303 --- phpBB/phpbb/db/migrator.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/migrator.php') 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 @@ -58,6 +58,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 * @@ -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; } -- cgit v1.2.1