|
...
|
...
|
@@ -238,6 +238,7 @@ class CopyProject extends Command |
|
|
|
$tables = Schema::connection('custom_tmp_mysql_copy')->getAllTables();
|
|
|
|
$tables = array_column($tables, 'Tables_in_' . $database_name);
|
|
|
|
foreach ($tables as $table) {
|
|
|
|
echo $table . PHP_EOL;
|
|
|
|
// 1. 删除目标数据库中的表
|
|
|
|
$result = DB::connection('custom_mysql')->statement("DROP TABLE IF EXISTS {$table}");
|
|
|
|
@file_put_contents(storage_path('logs/copy_mysql_error.log'), var_export('先删除对应数据库的对应表返回结果:'.$result, true) . PHP_EOL, FILE_APPEND);
|
...
|
...
|
|