mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-19 22:23:42 +00:00
refactor(backups): consolidate volume backup retention columns
This commit is contained in:
@@ -24,7 +24,11 @@ return new class extends Migration
|
||||
$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();
|
||||
|
||||
|
||||
-30
@@ -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',
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user