mirror of
https://github.com/coollabsio/coolify.git
synced 2026-06-14 03:19:51 +00:00
a4d75ff0e2
Prevent scheduled database backups from enabling S3 uploads without a valid team-owned storage configuration, and preserve the previous S3 storage ID in missing-storage error messages. Add coverage for backup edit/create validation and S3 upload failure messaging.
38 lines
828 B
PHP
38 lines
828 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ScheduledDatabaseBackupExecution extends BaseModel
|
|
{
|
|
protected $fillable = [
|
|
'uuid',
|
|
'scheduled_database_backup_id',
|
|
'status',
|
|
'message',
|
|
'size',
|
|
'filename',
|
|
'database_name',
|
|
'finished_at',
|
|
'local_storage_deleted',
|
|
's3_storage_deleted',
|
|
's3_uploaded',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'size' => 'integer',
|
|
's3_uploaded' => 'boolean',
|
|
'local_storage_deleted' => 'boolean',
|
|
's3_storage_deleted' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function scheduledDatabaseBackup(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ScheduledDatabaseBackup::class);
|
|
}
|
|
}
|