mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
prepare beta12
This commit is contained in:
@@ -268,6 +268,7 @@ class Install
|
||||
public function gotoStep($step)
|
||||
{
|
||||
nexus_redirect(getBaseUrl() . "?step=$step");
|
||||
die(0);
|
||||
}
|
||||
|
||||
public function maxStep()
|
||||
@@ -537,4 +538,20 @@ class Install
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function runMigrate()
|
||||
{
|
||||
if (!WITH_LARAVEL) {
|
||||
throw new \RuntimeException('Laravel is not avaliable.');
|
||||
}
|
||||
$command = "php " . ROOT_PATH . "artisan migrate --force";
|
||||
$result = exec($command, $output, $result_code);
|
||||
$this->doLog(sprintf('command: %s, result_code: %s, result: %s', $command, $result_code, $result));
|
||||
$this->doLog("output: " . json_encode($output));
|
||||
if ($result_code != 0) {
|
||||
throw new \RuntimeException(json_encode($output));
|
||||
} else {
|
||||
$this->doLog("[MIGRATE] success.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user