mirror of
https://github.com/v2board/v2board.git
synced 2025-01-11 00:29:09 +08:00
update
This commit is contained in:
parent
a490b6e487
commit
70faa4c510
@ -38,14 +38,14 @@ class V2boardInit extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$file = \File::get(base_path() . '/update.sql');
|
||||
$file = \File::get(base_path() . '/install.sql');
|
||||
if (!$file) {
|
||||
abort(500, '数据库更新文件不存在');
|
||||
abort(500, '数据库文件不存在');
|
||||
}
|
||||
$sql = str_replace("\n", "", $file);
|
||||
$sql = preg_split("/;/", $sql);
|
||||
if (!is_array($sql)) {
|
||||
abort(500, '数据库更新文件格式有误');
|
||||
abort(500, '数据库文件格式有误');
|
||||
}
|
||||
foreach($sql as $item) {
|
||||
echo 'RUN' . $item . "\r\n";
|
||||
|
@ -40,12 +40,12 @@ class V2boardUpdate extends Command
|
||||
{
|
||||
$file = \File::get(base_path() . '/update.sql');
|
||||
if (!$file) {
|
||||
abort(500, '数据库更新文件不存在');
|
||||
abort(500, '数据库文件不存在');
|
||||
}
|
||||
$sql = str_replace("\n", "", $file);
|
||||
$sql = preg_split("/;/", $sql);
|
||||
if (!is_array($sql)) {
|
||||
abort(500, '数据库更新文件格式有误');
|
||||
abort(500, '数据库文件格式有误');
|
||||
}
|
||||
foreach($sql as $item) {
|
||||
echo 'RUN' . $item . "\r\n";
|
||||
|
Loading…
Reference in New Issue
Block a user