mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 14:14:36 -04: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);
|
set_time_limit(0);
|
||||||
|
|
||||||
Backup::whereRaw('html_backup IS NOT NULL')->chunk(5000, function ($backups) {
|
Backup::whereHas('activity')->whereRaw('html_backup IS NOT NULL')->cursor()->each( function ($backup) {
|
||||||
foreach ($backups as $backup) {
|
|
||||||
|
|
||||||
if(strlen($backup->html_backup) > 1 && $backup->activity->invoice->exists()){
|
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();
|
return $this->belongsTo(Invoice::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function credit()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Credit::class)->withTrashed();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user