ソースを参照

修改主键问题

liaofei 2 年 前
コミット
6c02390071
1 ファイル変更3 行追加0 行削除
  1. 3 0
      crmeb/app/services/system/SystemCrudServices.php

+ 3 - 0
crmeb/app/services/system/SystemCrudServices.php

@@ -781,6 +781,9 @@ class SystemCrudServices extends BaseServices
         $table = new Table($tableName, ['comment' => $tableComment], $this->getAdapter());
         //创建字段
         foreach ($tableField as $item) {
+            if (isset($item['primaryKey']) && $item['primaryKey']) {
+                continue;
+            }
             $option = [];
             if (isset($item['limit'])) {
                 $option['limit'] = (int)$item['limit'];