資料同步 換表會錯的問題 20250612
This commit is contained in:
parent
751c65bccf
commit
6a93b717e7
@ -79,9 +79,8 @@ class TransferSqliteTableJob implements ShouldQueue
|
|||||||
DB::connection($mysqlConnection)->table("_{$table}")->insert($buffer);
|
DB::connection($mysqlConnection)->table("_{$table}")->insert($buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::statement("RENAME TABLE {$table} TO {$table}_");
|
DB::statement("DROP TABLE IF EXISTS {$table};");
|
||||||
DB::statement("RENAME TABLE _{$table} TO {$table}");
|
DB::statement("RENAME TABLE _{$table} TO {$table};");
|
||||||
DB::statement("DROP TABLE IF EXISTS {$table}_");
|
|
||||||
|
|
||||||
logger()->info("✅ Imported: {$table} ({$count} records)");
|
logger()->info("✅ Imported: {$table} ({$count} records)");
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user