fix: exclude deleted records when fetching companies from legacy database
This commit is contained in:
parent
15c76645e4
commit
535fe76197
@ -37,7 +37,9 @@ public function handle()
|
|||||||
$this->info('Starting company migration...');
|
$this->info('Starting company migration...');
|
||||||
|
|
||||||
$legacyConn = DB::connection('mysql_second');
|
$legacyConn = DB::connection('mysql_second');
|
||||||
$legacyCompanies = $legacyConn->table('companies')->get();
|
$legacyCompanies = $legacyConn->table('companies')
|
||||||
|
->whereNull('deleted_at')
|
||||||
|
->get();
|
||||||
|
|
||||||
if ($legacyCompanies->isEmpty()) {
|
if ($legacyCompanies->isEmpty()) {
|
||||||
$this->warn('No companies found in legacy database.');
|
$this->warn('No companies found in legacy database.');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user