Skip to content

Commit

Permalink
fix: 更新数据表脚本生成样式
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujingli committed Oct 16, 2024
1 parent 3d96732 commit a945cd8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/extend/PhinxExtend.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,12 @@ private static function _build2table(array $tables = [], bool $rehtml = false):
*/
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;
// 生成字段内容
Expand Down

0 comments on commit a945cd8

Please sign in to comment.