fix: resolve webhook notification settings migration conflict (#7393)
This commit is contained in:
commit
0d7f777814
2 changed files with 15 additions and 6 deletions
|
|
@ -35,6 +35,7 @@ public function up(): void
|
||||||
$table->boolean('server_reachable_webhook_notifications')->default(false);
|
$table->boolean('server_reachable_webhook_notifications')->default(false);
|
||||||
$table->boolean('server_unreachable_webhook_notifications')->default(true);
|
$table->boolean('server_unreachable_webhook_notifications')->default(true);
|
||||||
$table->boolean('server_patch_webhook_notifications')->default(false);
|
$table->boolean('server_patch_webhook_notifications')->default(false);
|
||||||
|
$table->boolean('traefik_outdated_webhook_notifications')->default(true);
|
||||||
|
|
||||||
$table->unique(['team_id']);
|
$table->unique(['team_id']);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,13 @@ public function up(): void
|
||||||
$table->boolean('traefik_outdated_slack_notifications')->default(true);
|
$table->boolean('traefik_outdated_slack_notifications')->default(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('webhook_notification_settings', function (Blueprint $table) {
|
// Only add if table exists and column doesn't exist
|
||||||
$table->boolean('traefik_outdated_webhook_notifications')->default(true);
|
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) {
|
Schema::table('telegram_notification_settings', function (Blueprint $table) {
|
||||||
$table->boolean('traefik_outdated_telegram_notifications')->default(true);
|
$table->boolean('traefik_outdated_telegram_notifications')->default(true);
|
||||||
|
|
@ -45,9 +49,13 @@ public function down(): void
|
||||||
$table->dropColumn('traefik_outdated_slack_notifications');
|
$table->dropColumn('traefik_outdated_slack_notifications');
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('webhook_notification_settings', function (Blueprint $table) {
|
// Only drop if table and column exist
|
||||||
$table->dropColumn('traefik_outdated_webhook_notifications');
|
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) {
|
Schema::table('telegram_notification_settings', function (Blueprint $table) {
|
||||||
$table->dropColumn('traefik_outdated_telegram_notifications');
|
$table->dropColumn('traefik_outdated_telegram_notifications');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue