作者 lyh

gx

@@ -614,9 +614,10 @@ class ProjectLogic extends BaseLogic @@ -614,9 +614,10 @@ class ProjectLogic extends BaseLogic
614 } 614 }
615 $sql = DB::connection('custom_tmp_mysql_copy')->select("SHOW CREATE TABLE {$v}"); 615 $sql = DB::connection('custom_tmp_mysql_copy')->select("SHOW CREATE TABLE {$v}");
616 DB::connection('custom_mysql')->statement(get_object_vars($sql[0])['Create Table']); 616 DB::connection('custom_mysql')->statement(get_object_vars($sql[0])['Create Table']);
617 - Schema::table($v, function ($v) use ($news_project_id) {  
618 - DB::table($v)->update(['project_id' => $news_project_id]);  
619 - }); 617 + $tables = Schema::getConnection()->getDoctrineSchemaManager()->listTableNames();
  618 + foreach ($table as $v1) {
  619 + DB::table($v1)->update(['project_id' => $news_project_id]);
  620 + }
620 } 621 }
621 return true; 622 return true;
622 } 623 }