From e22afd43e8b2a96dd922801422208b2309241851 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Fri, 28 Nov 2025 14:03:05 +0100 Subject: [PATCH] fix: resolve webhook notification settings migration conflict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add missing traefik_outdated_webhook_notifications column to the webhook_notification_settings table schema and add safety checks to the traefik migration to prevent errors when the table doesn't exist yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- ...te_webhook_notification_settings_table.php | 1 + ...efik_outdated_to_notification_settings.php | 20 +++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/database/migrations/2025_11_16_000001_create_webhook_notification_settings_table.php b/database/migrations/2025_11_16_000001_create_webhook_notification_settings_table.php index 9e9a6303f..df620bd6e 100644 --- a/database/migrations/2025_11_16_000001_create_webhook_notification_settings_table.php +++ b/database/migrations/2025_11_16_000001_create_webhook_notification_settings_table.php @@ -35,6 +35,7 @@ public function up(): void $table->boolean('server_reachable_webhook_notifications')->default(false); $table->boolean('server_unreachable_webhook_notifications')->default(true); $table->boolean('server_patch_webhook_notifications')->default(false); + $table->boolean('traefik_outdated_webhook_notifications')->default(true); $table->unique(['team_id']); }); diff --git a/database/migrations/2025_11_17_092707_add_traefik_outdated_to_notification_settings.php b/database/migrations/2025_11_17_092707_add_traefik_outdated_to_notification_settings.php index b5cad28b0..a0806ae9f 100644 --- a/database/migrations/2025_11_17_092707_add_traefik_outdated_to_notification_settings.php +++ b/database/migrations/2025_11_17_092707_add_traefik_outdated_to_notification_settings.php @@ -19,9 +19,13 @@ public function up(): void $table->boolean('traefik_outdated_slack_notifications')->default(true); }); - Schema::table('webhook_notification_settings', function (Blueprint $table) { - $table->boolean('traefik_outdated_webhook_notifications')->default(true); - }); + // Only add if table exists and column doesn't exist + if (Schema::hasTable('webhook_notification_settings') && + ! Schema::hasColumn('webhook_notification_settings', 'traefik_outdated_webhook_notifications')) { + Schema::table('webhook_notification_settings', function (Blueprint $table) { + $table->boolean('traefik_outdated_webhook_notifications')->default(true); + }); + } Schema::table('telegram_notification_settings', function (Blueprint $table) { $table->boolean('traefik_outdated_telegram_notifications')->default(true); @@ -45,9 +49,13 @@ public function down(): void $table->dropColumn('traefik_outdated_slack_notifications'); }); - Schema::table('webhook_notification_settings', function (Blueprint $table) { - $table->dropColumn('traefik_outdated_webhook_notifications'); - }); + // Only drop if table and column exist + if (Schema::hasTable('webhook_notification_settings') && + Schema::hasColumn('webhook_notification_settings', 'traefik_outdated_webhook_notifications')) { + Schema::table('webhook_notification_settings', function (Blueprint $table) { + $table->dropColumn('traefik_outdated_webhook_notifications'); + }); + } Schema::table('telegram_notification_settings', function (Blueprint $table) { $table->dropColumn('traefik_outdated_telegram_notifications');