Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

refactor(backups): consolidate volume backup retention columns

Andras Bacsaiaef70eb05364
diff --git a/database/migrations/2026_07_15_102537_create_scheduled_volume_backups_table.php b/database/migrations/2026_07_15_102537_create_scheduled_volume_backups_table.php
index c84b8c0f9d..4ef178cb73 100644
--- a/database/migrations/2026_07_15_102537_create_scheduled_volume_backups_table.php
+++ b/database/migrations/2026_07_15_102537_create_scheduled_volume_backups_table.php
@@ -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();
diff --git a/database/migrations/2026_07_15_125721_add_retention_limits_to_scheduled_volume_backups_table.php b/database/migrations/2026_07_15_125721_add_retention_limits_to_scheduled_volume_backups_table.php
deleted file mode 100644
index 1cf1fb7b17..0000000000
--- a/database/migrations/2026_07_15_125721_add_retention_limits_to_scheduled_volume_backups_table.php
+++ /dev/null
@@ -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',
- ]);
- });
- }
-};