From 66eb9cf4d627df12911344cd328faf9bb596bf2c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 11 Jul 2023 23:16:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A8=A1=E5=9E=8B=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=BC=93=E5=AD=98=E5=AF=B9=E5=AD=90=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/think/console/command/optimize/Schema.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/think/console/command/optimize/Schema.php b/src/think/console/command/optimize/Schema.php index 6ce3e64a85..424daaf309 100644 --- a/src/think/console/command/optimize/Schema.php +++ b/src/think/console/command/optimize/Schema.php @@ -67,7 +67,12 @@ protected function execute(Input $input, Output $output) if (0 === strpos($file, '.')) { continue; } + $class = '\\' . $namespace . '\\model\\' . pathinfo($file, PATHINFO_FILENAME); + if (!class_exists($class)) { + continue; + } + $this->buildModelSchema($class); } }