mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-04 14:22:48 +08:00
增加 optimize:schema 命令 用于生成 数据表字段信息缓存
This commit is contained in:
@@ -1375,7 +1375,12 @@ class Query
|
||||
|
||||
list($guid) = explode(' ', $tableName);
|
||||
if (!isset(self::$info[$guid])) {
|
||||
$info = $this->connection->getFields($tableName);
|
||||
// 读取缓存
|
||||
if (is_file(RUNTIME_PATH . 'schema/' . $guid . '.php')) {
|
||||
$info = include RUNTIME_PATH . 'schema/' . $guid . '.php';
|
||||
} else {
|
||||
$info = $this->connection->getFields($guid);
|
||||
}
|
||||
$fields = array_keys($info);
|
||||
$bind = $type = [];
|
||||
foreach ($info as $key => $val) {
|
||||
|
||||
Reference in New Issue
Block a user