完成内置的数据库日志驱动;内置数据库日志的定时清除;更新新的数据库sql;

This commit is contained in:
2022-04-03 15:29:06 +08:00
parent dc1b3d4ab4
commit 2a97375418
12 changed files with 487 additions and 390 deletions

View File

@@ -5,6 +5,8 @@ declare(strict_types=1);
namespace app\common\command;
use app\common\tools\PathTools;
use PDO;
use think\Config as ThinkConfig;
use think\console\Command;
use think\console\Input;
use think\console\input\Option;
@@ -34,6 +36,8 @@ class Install extends Command
protected function execute(Input $input, Output $output)
{
// 指令输出
$force = $input->getOption('force');
@@ -76,6 +80,12 @@ class Install extends Command
Db::startTrans();
try {
foreach ($sqlArray as $vo) {
if (strpos($vo, 'LOCK TABLES') === 0) {
continue;
}
if (strpos($vo, 'UNLOCK') === 0) {
continue;
}
Db::execute($vo);
}
Db::name('system_admin')