正在显示
1 个修改的文件
包含
1 行增加
和
0 行删除
| @@ -238,6 +238,7 @@ class CopyProject extends Command | @@ -238,6 +238,7 @@ class CopyProject extends Command | ||
| 238 | $tables = Schema::connection('custom_tmp_mysql_copy')->getAllTables(); | 238 | $tables = Schema::connection('custom_tmp_mysql_copy')->getAllTables(); |
| 239 | $tables = array_column($tables, 'Tables_in_' . $database_name); | 239 | $tables = array_column($tables, 'Tables_in_' . $database_name); |
| 240 | foreach ($tables as $table) { | 240 | foreach ($tables as $table) { |
| 241 | + echo $table . PHP_EOL; | ||
| 241 | // 1. 删除目标数据库中的表 | 242 | // 1. 删除目标数据库中的表 |
| 242 | $result = DB::connection('custom_mysql')->statement("DROP TABLE IF EXISTS {$table}"); | 243 | $result = DB::connection('custom_mysql')->statement("DROP TABLE IF EXISTS {$table}"); |
| 243 | @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); |
-
请 注册 或 登录 后发表评论