Update BuildCurd.php

This commit is contained in:
wolfcode
2024-03-24 18:57:18 +08:00
parent 9527157611
commit 79182aa90a

View File

@@ -275,12 +275,8 @@ class BuildCurd
if ($vo['Field'] == 'delete_time') {
$this->delete = true;
}
}
// 获取表名注释
$tableSchema = Db::query("SELECT table_name,table_comment FROM information_schema.TABLES WHERE table_schema = 'easyadmin' AND table_name = '{$this->tablePrefix}{$this->table}'");
$this->tableComment = (isset($tableSchema[0]['table_comment']) && !empty($tableSchema[0]['table_comment'])) ? $tableSchema[0]['table_comment'] : $this->table;
$this->tableComment = $this->table;
} catch (\Exception $e) {
throw new TableException($e->getMessage());
}