diff --git a/upgrades/6.0/scripts/BeforeUpgrade.php b/upgrades/6.0/scripts/BeforeUpgrade.php index 711c5ddd5e..a78796b666 100644 --- a/upgrades/6.0/scripts/BeforeUpgrade.php +++ b/upgrades/6.0/scripts/BeforeUpgrade.php @@ -35,11 +35,22 @@ class BeforeUpgrade { $this->container = $container; + $this->processCheckCLI(); + $this->processMyIsamCheck(); $this->processNextNumberAlterTable(); } + protected function processCheckCLI() + { + $isCli = (substr(php_sapi_name(), 0, 3) == 'cli') ? true : false; + + if (!$isCli) { + throw new Error("This upgrade can be run only from CLI."); + } + } + protected function processMyIsamCheck() { $myisamTableList = $this->getMyIsamTableList();