From c585e76dc76681a57f1c0a5cd93dbdd30f954f41 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Fri, 12 May 2023 10:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/system/SystemCrudServices.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crmeb/app/services/system/SystemCrudServices.php b/crmeb/app/services/system/SystemCrudServices.php index 64f0fdd1d..b66fa4d22 100644 --- a/crmeb/app/services/system/SystemCrudServices.php +++ b/crmeb/app/services/system/SystemCrudServices.php @@ -314,7 +314,7 @@ class SystemCrudServices extends BaseServices $type = addslashes($type); $default = addslashes($default); if (in_array(strtolower($type), ['text', 'longtext', 'tinytext'])) { - $sql = "ALTER TABLE `$tableName` CHANGE `$field` `$changeFiled` $type CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '$comment';"; + $sql = "ALTER TABLE `$tableName` CHANGE `$field` `$changeFiled` $type CHARACTER SET utf8mb4 COLLATE " . self::TABLR_COLLATION . " NULL COMMENT '$comment';"; } else { $sql = "ALTER TABLE `$tableName` CHANGE `$field` `$changeFiled` $type($limit) NOT NULL DEFAULT '$default' COMMENT '$comment';"; } @@ -510,7 +510,7 @@ class SystemCrudServices extends BaseServices //先检查表存在则 if ($id) { $this->updateFromCommon($tableName, $tableComment); - //删除数据库表 + //读取数据库表 $tableInfo = $this->getTableInfo($tableName); if ($tableInfo) { //对比字段进行更新/删除字段