qqq
This commit is contained in:
@@ -253,7 +253,7 @@ class Gii
|
|||||||
}
|
}
|
||||||
foreach ($tables as $key => $val) {
|
foreach ($tables as $key => $val) {
|
||||||
if (empty($val)) continue;
|
if (empty($val)) continue;
|
||||||
$_tmp = Db::findAllBySql('SHOW FULL FIELDS FROM `' . $this->db->database . '`.' . $val, [], $this->db);
|
$_tmp = Db::connect($this->db)->query('SHOW FULL FIELDS FROM `' . $this->db->database . '`.' . $val, []);
|
||||||
if (empty($_tmp)) {
|
if (empty($_tmp)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -296,7 +296,7 @@ class ' . $managerName . ' extends Model
|
|||||||
$key = '\'maxLength\' => ' . $key;
|
$key = '\'maxLength\' => ' . $key;
|
||||||
}
|
}
|
||||||
$string[] = '
|
$string[] = '
|
||||||
[[\'' . implode('\', \'', array_column($_val, 3)) . '\'], ' . ($_val[0][1] == 'enum' ? '\'enum\' => [' . $key .']' : $key) . ']';
|
[[\'' . implode('\', \'', array_column($_val, 3)) . '\'], ' . ($_val[0][1] == 'enum' ? '\'enum\' => [' . $key . ']' : $key) . ']';
|
||||||
}
|
}
|
||||||
return implode(',', $string);
|
return implode(',', $string);
|
||||||
}
|
}
|
||||||
@@ -392,7 +392,7 @@ class ' . $managerName . ' extends Model
|
|||||||
return Gii::$createSqls[$table];
|
return Gii::$createSqls[$table];
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = Db::showCreateSql($table, $this->db)['Create Table'] ?? '';
|
$text = Db::connect($this->db)->one('SHOW CREATE TABLE `'.$this->db->database. '`.`' . $table.'`')['Create Table'] ?? '';
|
||||||
|
|
||||||
$_tmp = [];
|
$_tmp = [];
|
||||||
foreach (explode(PHP_EOL, $text) as $val) {
|
foreach (explode(PHP_EOL, $text) as $val) {
|
||||||
|
|||||||
Reference in New Issue
Block a user