fix: 更新数据表脚本生成样式

This commit is contained in:
邹景立 2024-10-16 13:28:36 +08:00
parent c51adc055a
commit 4d67e13f6f

View File

@ -276,10 +276,12 @@ class PhinxExtend
*/
private function _create_{$table}()
{
// 创建更新数据表
PhinxExtend::upgrade(\$this->table('{$table}', [
// 创建数据表对象
\$table = \$this->table('{$table}', [
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '{$comment}',
]), _FIELDS_, _INDEXS_);
]);
// 创建或更新数据表
PhinxExtend::upgrade(\$table, _FIELDS_, _INDEXS_);
}
CODE;
// 生成字段内容