mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 15:20:40 +00:00
fix: resolve webhook notification settings migration conflict
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 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,7 @@ return new class extends Migration
|
||||
$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']);
|
||||
});
|
||||
|
||||
@@ -19,9 +19,13 @@ return new class extends Migration
|
||||
$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 @@ return new class extends Migration
|
||||
$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');
|
||||
|
||||
Reference in New Issue
Block a user