From 2335bfad8f2b543b135508a69980fcd05b5fb4e8 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 24 Nov 2025 15:08:41 +0100 Subject: [PATCH 1/2] fix: handle existing cloud_init_scripts table in migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The migration file was renamed from 120000 to 120002 between v444 and v445, causing "duplicate table" errors for users upgrading from v444 who already have the cloud_init_scripts table created. This fix adds a table existence check before creation, making the migration idempotent and safe for both fresh installations and upgrades. Fixes the error: SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "cloud_init_scripts" already exists 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../2025_10_10_120002_create_cloud_init_scripts_table.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/database/migrations/2025_10_10_120002_create_cloud_init_scripts_table.php b/database/migrations/2025_10_10_120002_create_cloud_init_scripts_table.php index 3d5634f50..ae63dc53a 100644 --- a/database/migrations/2025_10_10_120002_create_cloud_init_scripts_table.php +++ b/database/migrations/2025_10_10_120002_create_cloud_init_scripts_table.php @@ -11,6 +11,12 @@ */ public function up(): void { + // Check if table already exists (handles upgrades from v444 where this migration + // was named 2025_10_10_120000_create_cloud_init_scripts_table.php) + if (Schema::hasTable('cloud_init_scripts')) { + return; + } + Schema::create('cloud_init_scripts', function (Blueprint $table) { $table->id(); $table->foreignId('team_id')->constrained()->onDelete('cascade'); From e930005a503e046e4971b69886b817e3ab77fd78 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 24 Nov 2025 15:12:14 +0100 Subject: [PATCH 2/2] fix: handle existing webhook_notification_settings table in migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similar to cloud_init_scripts, this migration was renamed from 120000 to 120002 between v444 and v445, causing "duplicate table" errors for users upgrading who already have the webhook_notification_settings table created. Added table existence check before creation for idempotency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- ...10_120002_create_webhook_notification_settings_table.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/database/migrations/2025_10_10_120002_create_webhook_notification_settings_table.php b/database/migrations/2025_10_10_120002_create_webhook_notification_settings_table.php index a3edacbf9..c0689f81e 100644 --- a/database/migrations/2025_10_10_120002_create_webhook_notification_settings_table.php +++ b/database/migrations/2025_10_10_120002_create_webhook_notification_settings_table.php @@ -11,6 +11,12 @@ */ public function up(): void { + // Check if table already exists (handles upgrades from v444 where this migration + // was named 2025_10_10_120000_create_webhook_notification_settings_table.php) + if (Schema::hasTable('webhook_notification_settings')) { + return; + } + Schema::create('webhook_notification_settings', function (Blueprint $table) { $table->id(); $table->foreignId('team_id')->constrained()->cascadeOnDelete();