mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-25 17:01:49 -04:00
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.
This commit is contained in:
@@ -191,7 +191,7 @@
|
||||
<li>Copy backup file to database container</li>
|
||||
<li>Execute restore command</li>
|
||||
</ul>
|
||||
<p class="pt-2 font-semibold text-error">All existing data will be replaced.</p>
|
||||
<p class="pt-2 font-semibold text-error">Existing objects can cause the import to fail unless replacement is enabled.</p>
|
||||
</x-modal-confirmation>
|
||||
</div>
|
||||
</div>
|
||||
@@ -251,7 +251,7 @@
|
||||
<li>Copy file into database container</li>
|
||||
<li>Execute restore command</li>
|
||||
</ul>
|
||||
<p class="pt-2 font-semibold text-error">All existing data will be replaced.</p>
|
||||
<p class="pt-2 font-semibold text-error">Existing objects can cause the import to fail unless replacement is enabled.</p>
|
||||
</x-modal-confirmation>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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.');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user