current state

This commit is contained in:
2026-02-08 10:42:01 +01:00
parent 0a4372c40d
commit e055af9248
70 changed files with 4882 additions and 330 deletions

View File

@@ -25,17 +25,15 @@ class ImportLegacyUsers extends Command
$imported = 0;
$skipped = 0;
if (! DB::connection('legacy')->getPdo()) {
if (! DB::getPdo()) {
$this->error('Legacy DB connection "legacy" is not configured or reachable.');
return self::FAILURE;
}
DB::connection('legacy')
->table('users')
DB::table('users')
->chunkById($chunk, function ($rows) use (&$imported, &$skipped) {
$ids = $rows->pluck('user_id')->all();
$stats = DB::connection('legacy')
->table('users_statistics')
$stats = DB::table('users_statistics')
->whereIn('user_id', $ids)
->get()
->keyBy('user_id');