From c2ba68fc1fc380645aec167527996e758664fa4d Mon Sep 17 00:00:00 2001 From: ryuring Date: Mon, 4 Dec 2023 17:23:00 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=90=E3=82=AF=E3=82=A2=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=81=8B=E3=82=89=E3=81=AE=E3=83=AC=E3=82=B9=E3=83=88=E3=82=A2?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=83=90=E3=83=83=E3=82=AF=E3=82=A2=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=81=AE=E3=83=86=E3=83=BC=E3=83=96=E3=83=AB=E3=81=8C?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E3=81=97=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=81=AB=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=A8=E3=81=AA=E3=82=8B?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/baser-core/src/Service/BcDatabaseService.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/baser-core/src/Service/BcDatabaseService.php b/plugins/baser-core/src/Service/BcDatabaseService.php index 0421de05bc..35e395198c 100644 --- a/plugins/baser-core/src/Service/BcDatabaseService.php +++ b/plugins/baser-core/src/Service/BcDatabaseService.php @@ -1123,14 +1123,17 @@ public function loadSchema($options): bool require_once $options['path'] . $options['file']; /* @var BcSchema $schema */ $schema = new $schemaName(); - $schema->setTable($options['prefix'] . $schema->table); + $table = $options['prefix'] . $schema->table; + $schema->setTable($table); switch($options['type']) { case 'create': $schema->create(); break; case 'drop': - $schema->drop(); + if($this->tableExists($table)) { + $schema->drop(); + } break; } return true;