diff --git a/database/migrations/2026_09_25_210000_remove_legacy_traefik_dashboard_labels.php b/database/migrations/2026_09_25_210000_remove_legacy_traefik_dashboard_labels.php index 19a745b614..9bab033205 100644 --- a/database/migrations/2026_09_25_210000_remove_legacy_traefik_dashboard_labels.php +++ b/database/migrations/2026_09_25_210000_remove_legacy_traefik_dashboard_labels.php @@ -6,6 +6,11 @@ use Illuminate\Support\Facades\Log; return new class extends Migration { + /** + * Save each server on its own. In Postgres one failed update aborts a shared transaction and stops the upgrade. + */ + public $withinTransaction = false; + /** * Remove the Traefik dashboard router labels from saved proxy configurations. * Only the database is changed. The proxy shows a restart notice and applies the fix on the next restart. diff --git a/tests/Feature/Proxy/LegacyTraefikDashboardLabelsTest.php b/tests/Feature/Proxy/LegacyTraefikDashboardLabelsTest.php index dd5b9d2bc3..dc8fefc3af 100644 --- a/tests/Feature/Proxy/LegacyTraefikDashboardLabelsTest.php +++ b/tests/Feature/Proxy/LegacyTraefikDashboardLabelsTest.php @@ -141,6 +141,13 @@ test('the migration fixes saved legacy configurations without connecting to serv ->and($caddy->fresh()->proxy->last_saved_proxy_configuration)->toBe('services: {}'); }); +test('the migration saves each server outside one shared transaction', function () { + // In Postgres one failed update aborts a shared transaction, so later servers could not be saved. + $migration = require database_path('migrations/2026_09_25_210000_remove_legacy_traefik_dashboard_labels.php'); + + expect($migration->withinTransaction)->toBeFalse(); +}); + test('the pending proxy notice asks the user to restart the proxy', function () { $team = Team::factory()->create(); $user = User::factory()->create();