Refactor + package updates + improve local backups

This commit is contained in:
Andras Bacsai
2023-08-10 15:52:54 +02:00
parent d2a4dbf283
commit e17f1935d2
30 changed files with 757 additions and 366 deletions

View File

@@ -11,9 +11,9 @@ return new class extends Migration {
$table->id();
$table->string('uuid')->unique();
$table->boolean('enabled')->default(true);
$table->boolean('keep_locally')->default(false);
$table->string('save_s3')->default(true);
$table->string('frequency');
$table->integer('number_of_backups_locally')->default(7);
$table->morphs('database');
$table->foreignId('team_id');
$table->timestamps();

View File

@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::create('scheduled_database_backup_executions', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->enum('status', ['success', 'failed', 'running'])->default('running');
$table->longText('message')->nullable();
$table->text('size')->nullable();
$table->text('filename')->nullable();
$table->foreignId('scheduled_database_backup_id');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('scheduled_database_backup_executions');
}
};