refactor(backups): consolidate volume backup retention columns
This commit is contained in:
parent
9d04bb7e59
commit
aef70eb053
2 changed files with 4 additions and 30 deletions
|
|
@ -24,7 +24,11 @@ public function up(): void
|
|||
$table->boolean('disable_local_backup')->default(false);
|
||||
$table->boolean('stop_during_backup')->default(false);
|
||||
$table->unsignedInteger('retention_amount_locally')->default(7);
|
||||
$table->unsignedInteger('retention_days_locally')->default(0);
|
||||
$table->decimal('retention_max_storage_locally', 17, 7)->default(0);
|
||||
$table->unsignedInteger('retention_amount_s3')->default(7);
|
||||
$table->unsignedInteger('retention_days_s3')->default(0);
|
||||
$table->decimal('retention_max_storage_s3', 17, 7)->default(0);
|
||||
$table->unsignedInteger('timeout')->default(3600);
|
||||
$table->timestamps();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
<?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::table('scheduled_volume_backups', function (Blueprint $table) {
|
||||
$table->unsignedInteger('retention_days_locally')->default(0);
|
||||
$table->decimal('retention_max_storage_locally', 17, 7)->default(0);
|
||||
$table->unsignedInteger('retention_days_s3')->default(0);
|
||||
$table->decimal('retention_max_storage_s3', 17, 7)->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('scheduled_volume_backups', function (Blueprint $table) {
|
||||
$table->dropColumn([
|
||||
'retention_days_locally',
|
||||
'retention_max_storage_locally',
|
||||
'retention_days_s3',
|
||||
'retention_max_storage_s3',
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue