From a943c75a4493f38a0ba5c0baa4e595740c24a96e Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Mon, 16 Jun 2025 23:02:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AA=BF=E6=95=B4=20=E5=90=8C=E6=AD=A5Branch?= =?UTF-8?q?=20=E8=B3=87=E6=96=99=E6=9C=83=E5=85=A8=E9=83=A8=E5=88=B0?= =?UTF-8?q?=E5=88=86=E5=BA=97=E5=8E=BB=E7=9A=84=E5=95=8F=E9=A1=8C=20v3=202?= =?UTF-8?q?0250616?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/SqliteExportService.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/Services/SqliteExportService.php b/app/Services/SqliteExportService.php index 32100fc..9bbb032 100644 --- a/app/Services/SqliteExportService.php +++ b/app/Services/SqliteExportService.php @@ -8,7 +8,6 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\Log; class SqliteExportService { @@ -60,9 +59,7 @@ class SqliteExportService public function exportMultiple(array $tables): void { foreach ($tables as $tableName => $config) { - Log::info("[SqliteExport] Processing table: {$tableName}"); $this->dropAndCreateTable($tableName, $config['tableSchema']); - Log::info("[SqliteExport] Created table schema: {$tableName}"); $transformer = $config['transformer'] ?? fn($row) => (array)$row; if (isset($config['modelClass'])) { @@ -74,7 +71,6 @@ class SqliteExportService $rows = $chunk->map($transformer)->toArray(); $this->insertData($tableName, $rows); }); - Log::info("[SqliteExport] Exported {$totalCount} records to {$tableName} (via model)"); } elseif (isset($config['query']) && is_callable($config['query'])) { $rows = call_user_func($config['query']); @@ -84,13 +80,11 @@ class SqliteExportService $data = $rows->map($transformer)->toArray(); $this->insertData($tableName, $data); - Log::info("[SqliteExport] Exported " . count($data) . " records to {$tableName} (via query)"); } else { throw new \InvalidArgumentException("Each table config must define either 'modelClass' or 'query'."); } } $this->purge(); - Log::info("[SqliteExport] Connection purged: {$this->connection}"); } protected function dropAndCreateTable(string $table, Closure $schema): void