正在显示
1 个修改的文件
包含
0 行增加
和
1 行删除
| @@ -239,7 +239,6 @@ class CopyProject extends Command | @@ -239,7 +239,6 @@ class CopyProject extends Command | ||
| 239 | $tables = Schema::connection('custom_tmp_mysql_copy')->getAllTables(); | 239 | $tables = Schema::connection('custom_tmp_mysql_copy')->getAllTables(); |
| 240 | $tables = array_column($tables, 'Tables_in_' . $database_name); | 240 | $tables = array_column($tables, 'Tables_in_' . $database_name); |
| 241 | foreach ($tables as $table) { | 241 | foreach ($tables as $table) { |
| 242 | - echo $table . PHP_EOL; | ||
| 243 | // 1. 删除目标数据库中的表 | 242 | // 1. 删除目标数据库中的表 |
| 244 | $result = DB::connection('custom_mysql')->statement("DROP TABLE IF EXISTS {$table}"); | 243 | $result = DB::connection('custom_mysql')->statement("DROP TABLE IF EXISTS {$table}"); |
| 245 | @file_put_contents(storage_path('logs/copy_mysql_error.log'), var_export('先删除对应数据库的对应表返回结果:'.$result, true) . PHP_EOL, FILE_APPEND); | 244 | @file_put_contents(storage_path('logs/copy_mysql_error.log'), var_export('先删除对应数据库的对应表返回结果:'.$result, true) . PHP_EOL, FILE_APPEND); |
-
请 注册 或 登录 后发表评论