作者 lyh

gx

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