mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
Minor fixes for backup update
This commit is contained in:
parent
9ab15426eb
commit
10ef13fb9e
@ -77,8 +77,8 @@ class BackupUpdate extends Command
|
||||
{
|
||||
set_time_limit(0);
|
||||
|
||||
Backup::whereRaw('html_backup IS NOT NULL')->chunk(5000, function ($backups) {
|
||||
foreach ($backups as $backup) {
|
||||
Backup::whereHas('activity')->whereRaw('html_backup IS NOT NULL')->cursor()->each( function ($backup) {
|
||||
|
||||
|
||||
if(strlen($backup->html_backup) > 1 && $backup->activity->invoice->exists()){
|
||||
|
||||
@ -97,7 +97,7 @@ class BackupUpdate extends Command
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -177,6 +177,11 @@ class Activity extends StaticModel
|
||||
return $this->belongsTo(Invoice::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function credit()
|
||||
{
|
||||
return $this->belongsTo(Credit::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user