upgrade cli check

This commit is contained in:
Yuri Kuznetsov
2020-09-15 11:25:49 +03:00
parent b2aab26ded
commit 08636b550f
+11
View File
@@ -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();