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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(validation): allow decimals for database backups max storage
ShadowArcanist593006be88ce
diff --git a/app/Http/Controllers/Api/DatabasesController.php b/app/Http/Controllers/Api/DatabasesController.phpindex c05af152fb..a6056b9f30 100644--- a/app/Http/Controllers/Api/DatabasesController.php+++ b/app/Http/Controllers/Api/DatabasesController.php@@ -639,10 +639,10 @@ class DatabasesController extends Controller'backup_now' => ['type' => 'boolean', 'description' => 'Whether to trigger backup immediately after creation'],'database_backup_retention_amount_locally' => ['type' => 'integer', 'description' => 'Number of backups to retain locally'],'database_backup_retention_days_locally' => ['type' => 'integer', 'description' => 'Number of days to retain backups locally'],- 'database_backup_retention_max_storage_locally' => ['type' => 'integer', 'description' => 'Max storage (MB) for local backups'],+ 'database_backup_retention_max_storage_locally' => ['type' => 'number', 'description' => 'Max storage (GB) for local backups'],'database_backup_retention_amount_s3' => ['type' => 'integer', 'description' => 'Number of backups to retain in S3'],'database_backup_retention_days_s3' => ['type' => 'integer', 'description' => 'Number of days to retain backups in S3'],- 'database_backup_retention_max_storage_s3' => ['type' => 'integer', 'description' => 'Max storage (MB) for S3 backups'],+ 'database_backup_retention_max_storage_s3' => ['type' => 'number', 'description' => 'Max storage (GB) for S3 backups'],'timeout' => ['type' => 'integer', 'description' => 'Backup job timeout in seconds (min: 60, max: 36000)', 'default' => 3600],],),@@ -703,10 +703,10 @@ class DatabasesController extends Controller'databases_to_backup' => 'string|nullable','database_backup_retention_amount_locally' => 'integer|min:0','database_backup_retention_days_locally' => 'integer|min:0',- 'database_backup_retention_max_storage_locally' => 'integer|min:0',+ 'database_backup_retention_max_storage_locally' => 'numeric|min:0','database_backup_retention_amount_s3' => 'integer|min:0','database_backup_retention_days_s3' => 'integer|min:0',- 'database_backup_retention_max_storage_s3' => 'integer|min:0',+ 'database_backup_retention_max_storage_s3' => 'numeric|min:0','timeout' => 'integer|min:60|max:36000',]);@@ -878,10 +878,10 @@ class DatabasesController extends Controller'frequency' => ['type' => 'string', 'description' => 'Frequency of the backup'],'database_backup_retention_amount_locally' => ['type' => 'integer', 'description' => 'Retention amount of the backup locally'],'database_backup_retention_days_locally' => ['type' => 'integer', 'description' => 'Retention days of the backup locally'],- 'database_backup_retention_max_storage_locally' => ['type' => 'integer', 'description' => 'Max storage of the backup locally'],+ 'database_backup_retention_max_storage_locally' => ['type' => 'number', 'description' => 'Max storage of the backup locally'],'database_backup_retention_amount_s3' => ['type' => 'integer', 'description' => 'Retention amount of the backup in s3'],'database_backup_retention_days_s3' => ['type' => 'integer', 'description' => 'Retention days of the backup in s3'],- 'database_backup_retention_max_storage_s3' => ['type' => 'integer', 'description' => 'Max storage of the backup in S3'],+ 'database_backup_retention_max_storage_s3' => ['type' => 'number', 'description' => 'Max storage of the backup in S3'],'timeout' => ['type' => 'integer', 'description' => 'Backup job timeout in seconds (min: 60, max: 36000)', 'default' => 3600],],),@@ -933,10 +933,10 @@ class DatabasesController extends Controller'frequency' => 'string','database_backup_retention_amount_locally' => 'integer|min:0','database_backup_retention_days_locally' => 'integer|min:0',- 'database_backup_retention_max_storage_locally' => 'integer|min:0',+ 'database_backup_retention_max_storage_locally' => 'numeric|min:0','database_backup_retention_amount_s3' => 'integer|min:0','database_backup_retention_days_s3' => 'integer|min:0',- 'database_backup_retention_max_storage_s3' => 'integer|min:0',+ 'database_backup_retention_max_storage_s3' => 'numeric|min:0','timeout' => 'integer|min:60|max:36000',]);if ($validator->fails()) {diff --git a/resources/views/livewire/project/database/backup-edit.blade.php b/resources/views/livewire/project/database/backup-edit.blade.phpindex d5c25916a3..898283afd6 100644--- a/resources/views/livewire/project/database/backup-edit.blade.php+++ b/resources/views/livewire/project/database/backup-edit.blade.php@@ -106,7 +106,7 @@min="0"helper="Automatically removes backups older than the specified number of days. Set to 0 for no time limit." required /><x-forms.input label="Maximum storage (GB)" id="databaseBackupRetentionMaxStorageLocally"- type="number" min="0"+ type="number" min="0" step="any"helper="When total size of all backups in the current backup job exceeds this limit in GB, the oldest backups will be removed. Decimal values are supported (e.g. 0.001 for 1MB). Set to 0 for unlimited storage." required /></div></div>@@ -122,7 +122,7 @@min="0"helper="Automatically removes S3 backups older than the specified number of days. Set to 0 for no time limit." required /><x-forms.input label="Maximum storage (GB)" id="databaseBackupRetentionMaxStorageS3"- type="number" min="0"+ type="number" min="0" step="any"helper="When total size of all backups in the current backup job exceeds this limit in GB, the oldest backups will be removed. Decimal values are supported (e.g. 0.5 for 500MB). Set to 0 for unlimited storage." required /></div></div>