From b075693274341f78f894783e5ca18c6712eab6d1 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 18 Aug 2026 15:30:59 +0200 Subject: [PATCH] fix(backups): preserve existing volume backup timeouts Change only the default timeout for new volume backups without modifying existing schedules. --- ...6_08_15_000000_increase_default_volume_backup_timeout.php | 5 ----- tests/Feature/VolumeBackupTest.php | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/database/migrations/2026_08_15_000000_increase_default_volume_backup_timeout.php b/database/migrations/2026_08_15_000000_increase_default_volume_backup_timeout.php index f895c7837c..32eccce96b 100644 --- a/database/migrations/2026_08_15_000000_increase_default_volume_backup_timeout.php +++ b/database/migrations/2026_08_15_000000_increase_default_volume_backup_timeout.php @@ -2,17 +2,12 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up(): void { - DB::table('scheduled_volume_backups') - ->where('timeout', 3600) - ->update(['timeout' => 36000]); - Schema::table('scheduled_volume_backups', function (Blueprint $table) { $table->unsignedInteger('timeout')->default(36000)->change(); }); diff --git a/tests/Feature/VolumeBackupTest.php b/tests/Feature/VolumeBackupTest.php index e18f1475f4..b4f78d9e0a 100644 --- a/tests/Feature/VolumeBackupTest.php +++ b/tests/Feature/VolumeBackupTest.php @@ -61,7 +61,7 @@ it('allows large volume backups to run for ten hours by default', function () { ->and(config('queue.connections.redis.retry_after'))->toBeGreaterThan(config('horizon.defaults.s6.timeout')); }); -it('upgrades existing default volume backup timeouts without changing custom timeouts', function () { +it('changes the default volume backup timeout without changing existing timeouts', function () { $team = Team::factory()->create(); [$application, $defaultVolume] = createVolumeBackupApplication($team); $customVolume = LocalPersistentVolume::create([ @@ -84,7 +84,7 @@ it('upgrades existing default volume backup timeouts without changing custom tim $migration = require database_path('migrations/2026_08_15_000000_increase_default_volume_backup_timeout.php'); $migration->up(); - expect($defaultBackup->fresh()->timeout)->toBe(36000) + expect($defaultBackup->fresh()->timeout)->toBe(3600) ->and($customBackup->fresh()->timeout)->toBe(7200); });