init: scheduled backups
This commit is contained in:
15
app/Models/ScheduledDatabaseBackup.php
Normal file
15
app/Models/ScheduledDatabaseBackup.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ScheduledDatabaseBackup extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
public function database()
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,11 @@ class StandalonePostgresql extends BaseModel
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
public function scheduled_database_backups()
|
||||
{
|
||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||
}
|
||||
|
||||
public function environment_variables(): HasMany
|
||||
{
|
||||
return $this->hasMany(EnvironmentVariable::class);
|
||||
|
||||
Reference in New Issue
Block a user