mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Also update orphans.
This commit is contained in:
parent
d215510124
commit
34e006d87b
@ -152,7 +152,12 @@ class DeleteOrphanedTransactions extends Command
|
||||
$this->info('No orphaned journals.');
|
||||
}
|
||||
if($count > 0) {
|
||||
$this->info('Found %d orphaned journal(s).', $count);
|
||||
$this->info(sprintf('Found %d orphaned journal(s).', $count));
|
||||
TransactionJournal
|
||||
::leftJoin('transaction_groups', 'transaction_journals.transaction_group_id', 'transaction_groups.id')
|
||||
->whereNotNull('transaction_groups.deleted_at')
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
->update(['transaction_journals.deleted_at', now()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user