From 5a3d0002f82227b64cbdec87f7ba21aebbeb0de0 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 9 Sep 2026 13:04:02 +0200 Subject: [PATCH] fix(database): align restore confirmation copy with replace-existing behavior PostgreSQL single-database restores no longer always replace existing objects. Update the file and S3 confirmation dialogs so they match the callout instead of claiming all data will be replaced. --- .../livewire/project/database/import-form.blade.php | 4 ++-- tests/Feature/DatabaseRestoreDialogTest.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/views/livewire/project/database/import-form.blade.php b/resources/views/livewire/project/database/import-form.blade.php index 4dd771ac7e..03cc780e52 100644 --- a/resources/views/livewire/project/database/import-form.blade.php +++ b/resources/views/livewire/project/database/import-form.blade.php @@ -191,7 +191,7 @@
All existing data will be replaced.
+Existing objects can cause the import to fail unless replacement is enabled.
@@ -251,7 +251,7 @@All existing data will be replaced.
+Existing objects can cause the import to fail unless replacement is enabled.
diff --git a/tests/Feature/DatabaseRestoreDialogTest.php b/tests/Feature/DatabaseRestoreDialogTest.php index 5989543cf1..f373afe6e2 100644 --- a/tests/Feature/DatabaseRestoreDialogTest.php +++ b/tests/Feature/DatabaseRestoreDialogTest.php @@ -27,3 +27,13 @@ test('postgresql single database restore offers explicit object replacement', fu ->toContain('wire:model="postgresqlRestoreCommand"') ->toContain('label="Import command" readonly'); }); + +test('restore confirmation dialogs warn that existing objects can block the import', function () { + $view = file_get_contents(resource_path('views/livewire/project/database/import-form.blade.php')); + + expect($view) + ->toContain('submitAction="runImport"') + ->toContain('submitAction="restoreFromS3"') + ->toContain('Existing objects can cause the import to fail unless replacement is enabled.') + ->not->toContain('All existing data will be replaced.'); +});