mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 02:24:11 -05:00
fix(backups): preserve existing volume backup timeouts
Change only the default timeout for new volume backups without modifying existing schedules.
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user